일단은 뭐.. 작동하네요..

This commit is contained in:
2024-08-14 21:26:16 +09:00
parent b9ab9ac60f
commit 0633855374
4 changed files with 50 additions and 26 deletions

View File

@@ -140,8 +140,8 @@ void commands::Play::on_DLCompleted(std::string musicID, dpp::embed embed, const
auto voiceconn = event.from->get_voice(event.command.guild_id);
if (!voiceconn || !voiceconn->voiceclient || !voiceconn->voiceclient->is_ready()) {
event.from->creator->on_voice_ready([this, musicID, embed, voiceconn](const dpp::voice_ready_t& Voice){
this->Bot->enqueueMusic({musicID, embed}, voiceconn->voiceclient);
event.from->creator->on_voice_ready([this, musicID, embed](const dpp::voice_ready_t& Voice){
this->Bot->enqueueMusic({musicID, embed}, Voice.voice_client);
});
}
else {

View File

@@ -15,7 +15,12 @@ void commands::Queue::operator()(const dpp::slashcommand_t& event) {
dpp::message msg;
msg.set_channel_id(event.command.channel_id);
auto vc = event.from->connecting_voice_channels.find(event.command.guild_id)->second->voiceclient;
auto voiceconn = event.from->get_voice(event.command.guild_id);
if (!voiceconn || !voiceconn->voiceclient)
event.reply("음성 채팅방에 참가하지 않은 상태입니다.");
return;
auto vc = voiceconn->voiceclient;
std::vector<std::string> queuedSongs = vc->get_marker_metadata();
int remainingSongsCount = vc->get_tracks_remaining() - 1;