mirror of
https://github.com/HappyTanuki/BumbleCee.git
synced 2025-10-26 01:45:15 +00:00
코드 가독성 리팩터
This commit is contained in:
@@ -43,6 +43,7 @@ public:
|
||||
std::shared_ptr<dpp::cluster> cluster;
|
||||
/// @brief guild id 배열
|
||||
std::vector<dpp::snowflake> GIDs;
|
||||
|
||||
private:
|
||||
/// @brief Command 목록
|
||||
std::unordered_map<std::string, std::shared_ptr<commands::ICommand>> commands;
|
||||
|
||||
@@ -23,9 +23,11 @@ public:
|
||||
|
||||
/// @brief 명령어 별명
|
||||
std::vector<std::string> aliases;
|
||||
|
||||
private:
|
||||
/// @brief 봇 ID
|
||||
dpp::snowflake botID;
|
||||
|
||||
protected:
|
||||
/// @brief 음악재생 매니저
|
||||
std::shared_ptr<MusicPlayManager> musicManager;
|
||||
@@ -51,9 +53,10 @@ public: \
|
||||
description = DESCRIPTION; \
|
||||
init(); \
|
||||
} \
|
||||
virtual void execute(const dpp::slashcommand_t &event) override; \
|
||||
void execute(const dpp::slashcommand_t &event) override; \
|
||||
\
|
||||
protected: \
|
||||
virtual void init() override; \
|
||||
void init() override; \
|
||||
}; \
|
||||
}
|
||||
|
||||
|
||||
@@ -15,22 +15,35 @@ public:
|
||||
currentPlayingPosition = queue.begin();
|
||||
repeat = true;
|
||||
}
|
||||
void enqueue(std::shared_ptr<MusicQueueElement> Element);
|
||||
std::shared_ptr<MusicQueueElement> dequeue();
|
||||
std::list<std::shared_ptr<MusicQueueElement>>::iterator findById(std::string id);
|
||||
std::list<std::shared_ptr<MusicQueueElement>>::iterator findByIndex(int index);
|
||||
std::shared_ptr<MusicQueueElement> nowplaying();
|
||||
std::list<std::shared_ptr<MusicQueueElement>>::iterator next_music();
|
||||
std::shared_ptr<MusicQueueElement> jump_to_index(int idx);
|
||||
void clear();
|
||||
std::shared_ptr<MusicQueueElement> erase(std::list<std::shared_ptr<MusicQueueElement>>::iterator it);
|
||||
std::pair<std::shared_ptr<std::list<std::shared_ptr<MusicQueueElement>>>, std::list<std::shared_ptr<MusicQueueElement>>::iterator> getQueueCopy();
|
||||
int size();
|
||||
std::list<std::shared_ptr<MusicQueueElement>>::iterator end();
|
||||
void
|
||||
enqueue(std::shared_ptr<MusicQueueElement> Element);
|
||||
std::shared_ptr<MusicQueueElement>
|
||||
dequeue();
|
||||
std::list<std::shared_ptr<MusicQueueElement>>::iterator
|
||||
findById(std::string id);
|
||||
std::list<std::shared_ptr<MusicQueueElement>>::iterator
|
||||
findByIndex(int index);
|
||||
std::shared_ptr<MusicQueueElement>
|
||||
nowplaying();
|
||||
std::list<std::shared_ptr<MusicQueueElement>>::iterator
|
||||
next_music();
|
||||
std::shared_ptr<MusicQueueElement>
|
||||
jump_to_index(int idx);
|
||||
void
|
||||
clear();
|
||||
std::shared_ptr<MusicQueueElement>
|
||||
erase(std::list<std::shared_ptr<MusicQueueElement>>::iterator it);
|
||||
std::pair<std::shared_ptr<std::list<std::shared_ptr<MusicQueueElement>>>, std::list<std::shared_ptr<MusicQueueElement>>::iterator>
|
||||
getQueueCopy();
|
||||
int
|
||||
size();
|
||||
std::list<std::shared_ptr<MusicQueueElement>>::iterator
|
||||
end();
|
||||
|
||||
bool repeat;
|
||||
|
||||
std::list<std::shared_ptr<MusicQueueElement>>::iterator currentPlayingPosition;
|
||||
|
||||
private:
|
||||
std::list<std::shared_ptr<MusicQueueElement>> queue;
|
||||
std::mutex queueMutex;
|
||||
|
||||
@@ -20,6 +20,7 @@ public:
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
private:
|
||||
static dpp::embed makeEmbedPart(
|
||||
std::shared_ptr<std::list<std::shared_ptr<MusicQueueElement>>> queue,
|
||||
|
||||
Reference in New Issue
Block a user