1
0
Fork 0
mirror of https://gitlab.com/niansa/SomeBot.git synced 2025-03-06 20:48:26 +01:00
SomeBot/modules/fun.cpp
2023-10-06 22:43:44 +02:00

20 lines
592 B
C++

#include "../bot.hpp"
#include <thread>
class Fun {
Bot *bot;
public:
Fun(Bot *_bot) : bot(_bot) {
bot->add_chatcommand(Bot::ChatCommand({"ping"}, "Ping pong!"), [&](const dpp::slashcommand_t& event) {
event.reply(dpp::message("Pong!").set_flags(dpp::message_flags::m_ephemeral));
});
bot->add_chatcommand(Bot::ChatCommand({"cat", "katze"}, "Generiere eine Katze"), [&](const dpp::slashcommand_t& event) {
event.reply("https://thiscatdoesnotexist.com/?"+std::to_string(event.command.id));
});
}
};
BOT_ADD_MODULE(Fun);