Updated the ready.cpp listener

This commit is contained in:
Mathias Wagner 2023-10-29 16:33:35 +01:00
parent 4038369e46
commit 2b36e6f8b3
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -18,9 +18,13 @@ std::thread ready::get_status_thread(dpp::cluster &bot) {
}
void ready::execute(dpp::cluster &bot, const dpp::ready_t &event) {
std::cout << "Logged in as " << event.from->creator->me.username << " (" << event.from->creator->me.id << ")"
std::cout << "Logged in as " << bot.me.username << " (" << bot.me.id << ")"
<< std::endl;
std::thread status_thread = get_status_thread(bot);
status_thread.detach();
if (dpp::run_once<struct register_bot_commands>()) {
bot.global_command_create(dpp::slashcommand("rules", "Shows you the rules of the global chat", bot.me.id));
}
}