와! 소리가 나요! 근데 도당체 코루틴은 왜 안 되는데;

This commit is contained in:
2024-08-14 20:08:35 +09:00
parent 8607c4a8a5
commit b9ab9ac60f
12 changed files with 228 additions and 177 deletions

View File

@@ -6,7 +6,7 @@
class IBot {
public:
IBot(std::string token, std::string DBURL, std::string DBID, std::string DBPassword, int clusterCount = 0);
IBot(std::string token, int clusterCount = 0);
virtual void start();
virtual void onCommand(const dpp::slashcommand_t &event);
virtual void onReady(const dpp::ready_t &event);
@@ -24,9 +24,4 @@ public:
};
dpp::loglevel logLevel = dpp::ll_debug;
protected:
sql::Driver* DBDriver;
std::shared_ptr<sql::SQLString> DBURL;
std::shared_ptr<sql::Properties> DBProperties;
};

View File

@@ -9,10 +9,18 @@
class BumbleCeepp : public IBot {
public:
BumbleCeepp(std::string token, std::string DBURL, std::string DBID, std::string DBPassword, int clusterCount = 0);
~BumbleCeepp();
void enqueueMusic(FQueueElement item, dpp::discord_voice_client* vc);
dpp::embed findEmbed(std::string musicID);
dpp::embed makeEmbed(
std::shared_ptr<dpp::embed> findEmbed(std::string musicID);
bool insertDB(
std::string webpage_url,
std::string title,
std::string uploader,
std::string id,
std::string thumbnail,
time_t duration);
std::shared_ptr<dpp::embed> makeEmbed(
std::string webpage_url,
std::string title,
std::string uploader,
@@ -26,5 +34,5 @@ public:
private:
//<guild_id, queueMutex> 쌍임.
std::unordered_map<dpp::snowflake, std::mutex> enqueuingMutexMap;
std::unordered_map<std::string, dpp::embed> musicEmbedMap;
sql::Connection* conn;
};

View File

@@ -9,5 +9,6 @@ public:
Play(dpp::snowflake botID, BumbleCeepp* Bot);
void operator()(const dpp::slashcommand_t& event);
void on_DLCompleted(std::string musicID, dpp::embed embed, const dpp::slashcommand_t& event);
};
}