코드 갈어엎기(사용성 개박살났으니 빌드는 이전 것으로 할 것.)

This commit is contained in:
2024-05-12 03:54:44 +09:00
parent ba56fe015f
commit 3f1edbbf16
29 changed files with 437 additions and 518 deletions

View File

@@ -2,25 +2,23 @@
#include <dpp/dpp.h>
#include <string>
commands::Repeat::Repeat(std::shared_ptr<dpp::cluster> botCluster, std::unordered_map<dpp::snowflake, std::shared_ptr<MusicQueue>> *queueMap)
: VCCommand(botCluster)
commands::Repeat::Repeat(dpp::snowflake botID, BumbleCeepp* Bot)
: ICommand(botID, Bot)
{
this->queueMap = queueMap;
dpp::slashcommand command = dpp::slashcommand("r", "반복 켜기/끄기", botCluster->me.id);
dpp::slashcommand command = dpp::slashcommand("r", "반복 켜기/끄기", botID);
commandObjectVector.push_back(command);
}
void commands::Repeat::operator()(const dpp::slashcommand_t& event) {
std::shared_ptr<MusicQueue> queue = getQueue(event);
if (queue->repeat) {
if (Bot->repeat) {
event.reply("반복을 껐습니다.");
queue->repeat = false;
Bot->repeat = false;
}
else {
event.reply("반복을 켰습니다.");
queue->repeat = true;
Bot->repeat = true;
}
return;