Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <dpp/dpp.h>
- //NOTE THIS IS MY FIRST BOT LOL
- const std::string BOT_TOKEN = "trashy bot i made at 3am";
- int main(int argc, char* argv[]) {
- dpp::cluster bot(BOT_TOKEN);
- bot.on_log(dpp::utility::cout_logger());
- bot.on_slashcommand([](const dpp::slashcommand_t& event) {
- if (event.command.get_command_name() == "ching_chong") {
- event.reply("https://www.youtube.com/watch?v=qGk4E9ss95s&t=52s");
- }
- else if (event.command.get_command_name() == "playlist") {
- event.reply("1. i did ur mom");
- }
- else if (event.command.get_command_name() == "hello") {
- event.reply("you suck + your life has been invalidated");
- }
- else if (event.command.get_command_name() == "ping") {
- event.reply("Pong, and i ponged your existence(nords make corney cringey and unfunny jokes in their unnatural habitat.)");
- }
- else if (event.command.get_command_name() == "how_do_i_work") {
- event.reply("Here is the lecture of how i was programmed,\nBasically i started off as a simple visual studio project, i used to be called learning bot. I work by importing DPP, the package i use for the C++ library and then my creator created a bot cluster with my bot token. My bot token is very similar to your password so i wont give it to you, next he makes an event that checks everytime you use a slash command, it checks if the command's name is equals too an available command, next i make an event that only runs once and creates a global command for myself. My creator loves C++ and claims it is fun. I myself, the bot not the creator can only code in air. Now you know.");
- }
- else if (event.command.get_command_name() == "creator") {
- event.reply("I was created by Spooky#0480, cool guy and he loves programming, while i(the bot) program the girls to go away from me");
- }
- else if (event.command.get_command_name() == "token") {
- event.reply("I am not dumb, i wont give it to you.");
- }
- });
- bot.on_ready([&bot](const dpp::ready_t& event) {
- if (dpp::run_once<struct register_bot_commands>())
- {
- bot.global_command_create(dpp::slashcommand("ching_chong", "ching chogn hanji ching cahng!", bot.me.id));
- bot.global_command_create(dpp::slashcommand("playlist", "Spotify playlist... um actually-", bot.me.id));
- bot.global_command_create(dpp::slashcommand("hello", "Start a nerdy conversation with NORD tm", bot.me.id));
- bot.global_command_create(dpp::slashcommand("ping", "Ping????", bot.me.id));
- bot.global_command_create(dpp::slashcommand("how_do_i_work", "I will give you a lecture.", bot.me.id));
- bot.global_command_create(dpp::slashcommand("creator", "who tf created me", bot.me.id));
- bot.global_command_create(dpp::slashcommand("token", "no...", bot.me.id));
- }
- });
- bot.start(dpp::st_wait);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement