음챗 나가기 구현 완료

This commit is contained in:
2023-12-28 00:06:34 +09:00
parent 8a987320e0
commit 52c4bdf3d4
780 changed files with 260 additions and 162577 deletions

View File

@@ -1,31 +1,29 @@
#include <Commands/Skip.hpp>
#include <dpp/dpp.h>
#include <dpp/nlohmann/json.hpp>
#include <string>
#include <ctime>
using json = nlohmann::json;
namespace Commands {
Skip::Skip(std::shared_ptr<BumbleCeepp> Bot) {
this->Bot = Bot;
Skip::Skip(std::shared_ptr<BumbleCeepp> Bot) {
this->Bot = Bot;
dpp::slashcommand Command = dpp::slashcommand("skip", "현재곡 스킵", Bot->BotCluster->me.id);
dpp::slashcommand Alias = dpp::slashcommand("s", "현재곡 스킵", Bot->BotCluster->me.id);
dpp::slashcommand Command = dpp::slashcommand("skip", "현재곡 스킵", Bot->BotCluster->me.id);
dpp::slashcommand Alias = dpp::slashcommand("s", "현재곡 스킵", Bot->BotCluster->me.id);
CommandObjectVector.push_back(Command);
CommandObjectVector.push_back(Alias);
}
void Skip::operator()(std::list<FQueueElement>& MusicQueue, const dpp::slashcommand_t& Event) {
dpp::voiceconn* v = Event.from->get_voice(Event.command.guild_id);
if (!v || !v->voiceclient || !v->voiceclient->is_ready()) {
return;
CommandObjectVector.push_back(Command);
CommandObjectVector.push_back(Alias);
}
v->voiceclient->stop_audio();
void Skip::operator()(std::list<FQueueElement>& MusicQueue, const dpp::slashcommand_t& Event) {
dpp::voiceconn* v = Event.from->get_voice(Event.command.guild_id);
Event.reply("스킵했습니다!");
if (!v || !v->voiceclient || !v->voiceclient->is_ready()) {
return;
}
return;
v->voiceclient->stop_audio();
Event.reply("스킵했습니다!");
return;
}
}