코드 갈어엎기(사용성 개박살났으니 빌드는 이전 것으로 할 것.)

This commit is contained in:
2024-05-12 03:54:44 +09:00
parent ba56fe015f
commit 3f1edbbf16
29 changed files with 437 additions and 518 deletions

View File

@@ -2,28 +2,21 @@
#include <dpp/dpp.h>
#include <vector>
#include <list>
#include <MusicQueue.hpp>
class BumbleCeepp;
namespace commands {
class ICommand {
public:
//이 생성자를 명시적으로 호출할 것.
ICommand(std::shared_ptr<dpp::cluster> botCluster);
ICommand(dpp::snowflake botID, BumbleCeepp* Bot)
{
this->botID = botID;
this->Bot = Bot;
}
virtual void operator()(const dpp::slashcommand_t &event) = 0;
std::vector<dpp::slashcommand> commandObjectVector;
protected:
std::shared_ptr<dpp::cluster> botCluster;
};
}
namespace commands {
class VCCommand : public ICommand {
public:
VCCommand(std::shared_ptr<dpp::cluster> botCluster) : ICommand(botCluster) {}
std::shared_ptr<MusicQueue> getQueue(const dpp::slashcommand_t& event);
protected:
std::unordered_map<dpp::snowflake, std::shared_ptr<MusicQueue>> *queueMap;
dpp::snowflake botID;
BumbleCeepp* Bot;
};
}

View File

@@ -4,9 +4,9 @@
#include <memory>
namespace commands {
class Delete : public VCCommand {
class Delete : public ICommand {
public:
Delete(std::shared_ptr<dpp::cluster> botCluster, std::unordered_map<dpp::snowflake, std::shared_ptr<MusicQueue>> *queueMap);
Delete(dpp::snowflake botID, BumbleCeepp* Bot);
void operator()(const dpp::slashcommand_t& event);
};

View File

@@ -4,9 +4,9 @@
#include <memory>
namespace commands {
class Leave : public VCCommand {
class Leave : public ICommand {
public:
Leave(std::shared_ptr<dpp::cluster> botCluster, std::unordered_map<dpp::snowflake, std::shared_ptr<MusicQueue>> *queueMap);
Leave(dpp::snowflake botID, BumbleCeepp* Bot);
void operator()(const dpp::slashcommand_t& event);
};

View File

@@ -4,9 +4,9 @@
#include <memory>
namespace commands {
class Play : public VCCommand {
class Play : public ICommand {
public:
Play(std::shared_ptr<dpp::cluster> botCluster, std::unordered_map<dpp::snowflake, std::shared_ptr<MusicQueue>> *queueMap);
Play(dpp::snowflake botID, BumbleCeepp* Bot);
void operator()(const dpp::slashcommand_t& event);
};

View File

@@ -4,9 +4,9 @@
#include <memory>
namespace commands {
class Queue : public VCCommand {
class Queue : public ICommand {
public:
Queue(std::shared_ptr<dpp::cluster> botCluster, std::unordered_map<dpp::snowflake, std::shared_ptr<MusicQueue>> *queueMap);
Queue(dpp::snowflake botID, BumbleCeepp* Bot);
void operator()(const dpp::slashcommand_t& event);
};

View File

@@ -4,9 +4,9 @@
#include <memory>
namespace commands {
class Repeat : public VCCommand {
class Repeat : public ICommand {
public:
Repeat(std::shared_ptr<dpp::cluster> botCluster, std::unordered_map<dpp::snowflake, std::shared_ptr<MusicQueue>> *queueMap);
Repeat(dpp::snowflake botID, BumbleCeepp* Bot);
void operator()(const dpp::slashcommand_t& event);
};

View File

@@ -4,9 +4,9 @@
#include <memory>
namespace commands {
class Skip : public VCCommand {
class Skip : public ICommand {
public:
Skip(std::shared_ptr<dpp::cluster> botCluster, std::unordered_map<dpp::snowflake, std::shared_ptr<MusicQueue>> *queueMap);
Skip(dpp::snowflake botID, BumbleCeepp* Bot);
void operator()(const dpp::slashcommand_t& event);
};