큐버그 해결?

This commit is contained in:
2024-08-02 00:10:03 +09:00
parent 75a34d12b6
commit e62a862e42

View File

@@ -6,11 +6,14 @@ commands::ICommand::ICommand(std::shared_ptr<dpp::cluster> botCluster)
}
std::shared_ptr<MusicQueue> commands::VCCommand::getQueue(const dpp::slashcommand_t& event) {
FMusicQueueID queueID;
queueID.guild_id = event.command.guild_id;
queueID.shard_id = event.from->shard_id;
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, botCluster);
return queueMap->find(queueID.guild_id)->second;
(*queueMap)[queueID.guild_id] = std::make_shared<MusicQueue>(queueID, botCluster);
}
return queueMap->find(event.command.guild_id)->second;
}