mirror of
https://gitlab.com/niansa/SomeBot.git
synced 2025-03-06 20:48:26 +01:00
20 lines
592 B
C++
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);
|