mirror of
https://github.com/HappyTanuki/BumbleCee.git
synced 2025-10-26 09:55:14 +00:00
완?성
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#include <string>
|
||||
|
||||
commands::Repeat::Repeat(std::shared_ptr<dpp::cluster> botCluster, std::unordered_map<dpp::snowflake, std::shared_ptr<MusicQueue>> *queueMap)
|
||||
: ICommand(botCluster)
|
||||
: VCCommand(botCluster)
|
||||
{
|
||||
this->queueMap = queueMap;
|
||||
dpp::slashcommand command = dpp::slashcommand("r", "반복 켜기/끄기", botCluster->me.id);
|
||||
@@ -12,16 +12,7 @@ commands::Repeat::Repeat(std::shared_ptr<dpp::cluster> botCluster, std::unordere
|
||||
}
|
||||
|
||||
void commands::Repeat::operator()(const dpp::slashcommand_t& event) {
|
||||
auto findResult = queueMap->find(event.command.guild_id);
|
||||
if (findResult == queueMap->end())
|
||||
{
|
||||
FMusicQueueID queueID;
|
||||
queueID.guild_id = event.command.guild_id;
|
||||
queueID.shard_id = event.from->shard_id;
|
||||
|
||||
(*queueMap)[queueID.guild_id] = std::make_shared<MusicQueue>(queueID);
|
||||
}
|
||||
std::shared_ptr<MusicQueue> queue = queueMap->find(event.command.guild_id)->second;
|
||||
std::shared_ptr<MusicQueue> queue = getQueue(event);
|
||||
|
||||
if (queue->repeat) {
|
||||
event.reply("반복을 껐습니다.");
|
||||
|
||||
Reference in New Issue
Block a user