1
0
Fork 0
mirror of https://gitlab.com/niansa/discord_llama.git synced 2025-03-06 20:48:25 +01:00

Run cleanup periodically

This commit is contained in:
niansa 2023-04-30 00:36:47 +02:00
parent 0c79c1f698
commit db7351a6c8

View file

@ -584,6 +584,10 @@ public:
bot.on_slashcommand([=, this](dpp::slashcommand_t event) {
command_completion_handler(std::move(event));
});
bot.on_message_create([=, this](...) {
// Attempt cleanup
attempt_cleanup();
});
bot.on_message_create([=, this](const dpp::message_create_t& event) {
// Check that this is for thread creation
if (event.msg.type != dpp::mt_thread_created) return;