mirror of
https://github.com/HappyTanuki/BumbleCee.git
synced 2025-10-26 01:45:15 +00:00
완?성
This commit is contained in:
@@ -15,4 +15,15 @@ public:
|
||||
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;
|
||||
};
|
||||
}
|
||||
@@ -4,12 +4,10 @@
|
||||
#include <memory>
|
||||
|
||||
namespace commands {
|
||||
class Delete : public ICommand {
|
||||
class Delete : public VCCommand {
|
||||
public:
|
||||
Delete(std::shared_ptr<dpp::cluster> botCluster, std::unordered_map<dpp::snowflake, std::shared_ptr<MusicQueue>> *queueMap);
|
||||
|
||||
void operator()(const dpp::slashcommand_t& event);
|
||||
private:
|
||||
std::unordered_map<dpp::snowflake, std::shared_ptr<MusicQueue>> *queueMap;
|
||||
};
|
||||
}
|
||||
@@ -4,12 +4,10 @@
|
||||
#include <memory>
|
||||
|
||||
namespace commands {
|
||||
class Leave : public ICommand {
|
||||
class Leave : public VCCommand {
|
||||
public:
|
||||
Leave(std::shared_ptr<dpp::cluster> botCluster, std::unordered_map<dpp::snowflake, std::shared_ptr<MusicQueue>> *queueMap);
|
||||
|
||||
void operator()(const dpp::slashcommand_t& event);
|
||||
private:
|
||||
std::unordered_map<dpp::snowflake, std::shared_ptr<MusicQueue>> *queueMap;
|
||||
};
|
||||
}
|
||||
@@ -4,12 +4,10 @@
|
||||
#include <memory>
|
||||
|
||||
namespace commands {
|
||||
class Play : public ICommand {
|
||||
class Play : public VCCommand {
|
||||
public:
|
||||
Play(std::shared_ptr<dpp::cluster> botCluster, std::unordered_map<dpp::snowflake, std::shared_ptr<MusicQueue>> *queueMap);
|
||||
|
||||
void operator()(const dpp::slashcommand_t& event);
|
||||
private:
|
||||
std::unordered_map<dpp::snowflake, std::shared_ptr<MusicQueue>> *queueMap;
|
||||
};
|
||||
}
|
||||
@@ -4,12 +4,10 @@
|
||||
#include <memory>
|
||||
|
||||
namespace commands {
|
||||
class Queue : public ICommand {
|
||||
class Queue : public VCCommand {
|
||||
public:
|
||||
Queue(std::shared_ptr<dpp::cluster> botCluster, std::unordered_map<dpp::snowflake, std::shared_ptr<MusicQueue>> *queueMap);
|
||||
|
||||
void operator()(const dpp::slashcommand_t& event);
|
||||
private:
|
||||
std::unordered_map<dpp::snowflake, std::shared_ptr<MusicQueue>> *queueMap;
|
||||
};
|
||||
}
|
||||
@@ -4,12 +4,10 @@
|
||||
#include <memory>
|
||||
|
||||
namespace commands {
|
||||
class Repeat : public ICommand {
|
||||
class Repeat : public VCCommand {
|
||||
public:
|
||||
Repeat(std::shared_ptr<dpp::cluster> botCluster, std::unordered_map<dpp::snowflake, std::shared_ptr<MusicQueue>> *queueMap);
|
||||
|
||||
void operator()(const dpp::slashcommand_t& event);
|
||||
private:
|
||||
std::unordered_map<dpp::snowflake, std::shared_ptr<MusicQueue>> *queueMap;
|
||||
};
|
||||
}
|
||||
@@ -4,12 +4,10 @@
|
||||
#include <memory>
|
||||
|
||||
namespace commands {
|
||||
class Skip : public ICommand {
|
||||
class Skip : public VCCommand {
|
||||
public:
|
||||
Skip(std::shared_ptr<dpp::cluster> botCluster, std::unordered_map<dpp::snowflake, std::shared_ptr<MusicQueue>> *queueMap);
|
||||
|
||||
void operator()(const dpp::slashcommand_t& event);
|
||||
private:
|
||||
std::unordered_map<dpp::snowflake, std::shared_ptr<MusicQueue>> *queueMap;
|
||||
};
|
||||
}
|
||||
@@ -9,7 +9,7 @@ struct FMusicQueueID {
|
||||
|
||||
class MusicQueue {
|
||||
public:
|
||||
MusicQueue(FMusicQueueID id);
|
||||
MusicQueue(FMusicQueueID id, std::shared_ptr<dpp::cluster> botCluster);
|
||||
void operator+=(FQueueElement operand);
|
||||
FQueueElement pop(int index);
|
||||
FQueueElement peek(int index);
|
||||
@@ -19,9 +19,9 @@ public:
|
||||
std::list<struct FQueueElement>::iterator end();
|
||||
std::size_t size();
|
||||
FMusicQueueID getId();
|
||||
void play(std::shared_ptr<dpp::cluster> botCluster);
|
||||
void play();
|
||||
|
||||
void markerCallback(std::shared_ptr<dpp::cluster> botCluster);
|
||||
void markerCallback();
|
||||
|
||||
bool repeat;
|
||||
private:
|
||||
@@ -29,5 +29,5 @@ private:
|
||||
std::mutex mutex;
|
||||
std::mutex playMutex;
|
||||
FMusicQueueID id;
|
||||
bool queuePlaying;
|
||||
std::shared_ptr<dpp::cluster> botCluster;
|
||||
};
|
||||
Reference in New Issue
Block a user