Advertisement
Touch_Grass

Untitled

Mar 13th, 2023
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.97 KB | Source Code | 0 0
  1. #include <dpp/dpp.h>
  2.  
  3. //NOTE THIS IS MY FIRST BOT LOL
  4. const std::string BOT_TOKEN = "trashy bot i made at 3am";
  5.  
  6. int main(int argc, char* argv[]) {
  7.  
  8.     dpp::cluster bot(BOT_TOKEN);
  9.  
  10.     bot.on_log(dpp::utility::cout_logger());
  11.    
  12.     bot.on_slashcommand([](const dpp::slashcommand_t& event) {
  13.         if (event.command.get_command_name() == "ching_chong") {
  14.             event.reply("https://www.youtube.com/watch?v=qGk4E9ss95s&t=52s");
  15.         }
  16.         else if (event.command.get_command_name() == "playlist") {
  17.             event.reply("1. i did ur mom");
  18.         }
  19.         else if (event.command.get_command_name() == "hello") {
  20.             event.reply("you suck + your life has been invalidated");
  21.         }
  22.         else if (event.command.get_command_name() == "ping") {
  23.             event.reply("Pong, and i ponged your existence(nords make corney cringey and unfunny jokes in their unnatural habitat.)");
  24.         }
  25.         else if (event.command.get_command_name() == "how_do_i_work") {
  26.             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.");
  27.         }
  28.         else if (event.command.get_command_name() == "creator") {
  29.             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");
  30.         }
  31.         else if (event.command.get_command_name() == "token") {
  32.             event.reply("I am not dumb, i wont give it to you.");
  33.         }
  34.     });
  35.  
  36.     bot.on_ready([&bot](const dpp::ready_t& event) {
  37.         if (dpp::run_once<struct register_bot_commands>())
  38.         {
  39.             bot.global_command_create(dpp::slashcommand("ching_chong", "ching chogn hanji ching cahng!", bot.me.id));
  40.             bot.global_command_create(dpp::slashcommand("playlist", "Spotify playlist... um actually-", bot.me.id));
  41.             bot.global_command_create(dpp::slashcommand("hello", "Start a nerdy conversation with NORD tm", bot.me.id));
  42.             bot.global_command_create(dpp::slashcommand("ping", "Ping????", bot.me.id));
  43.             bot.global_command_create(dpp::slashcommand("how_do_i_work", "I will give you a lecture.", bot.me.id));
  44.             bot.global_command_create(dpp::slashcommand("creator", "who tf created me", bot.me.id));
  45.             bot.global_command_create(dpp::slashcommand("token", "no...", bot.me.id));
  46.         }
  47.     });
  48.  
  49.     bot.start(dpp::st_wait);
  50. }
  51.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement