mirror of
https://github.com/HappyTanuki/BumbleCee.git
synced 2025-10-26 09:55:14 +00:00
음챗 나가기 구현 완료
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user