Advertisement
viirall

Fun Commands.ts

Jun 7th, 2020
2,284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const command = new discord.command.CommandGroup({
  2.   defaultPrefix: '.',
  3.   description: 'Fun Games for Pylon that you can implement in your server.'
  4. });
  5.  
  6. command.on(
  7.   'roll',
  8.   (args) => ({
  9.     sides: args.integerOptional()
  10.   }),
  11.   async (message, { sides }) => {
  12.     sides = sides || 6;
  13.  
  14.     const result = Math.ceil(Math.random() * sides);
  15.     message.reply(
  16.       new discord.Embed({
  17.         title: `${message.author.getTag()}'s Roll`,
  18.         color: (Math.random() * 0xffffff) | 0,
  19.         description: `🎲 You Landed on **${result}!**`,
  20.         footer: {
  21.           text: '.help'
  22.         }
  23.       }).setTimestamp(new Date().toISOString())
  24.     );
  25.   }
  26. );
  27.  
  28. command.on(
  29.   'gayrate',
  30.   (args) => ({
  31.     user: args.userOptional()
  32.   }),
  33.   async (message, { user }) => {
  34.     await message.addReaction('🏳️‍🌈');
  35.     if (user !== null) {
  36.       const richEmbed = new discord.Embed();
  37.       richEmbed.setTitle(`Gay Calculator 🏳️‍🌈`);
  38.       richEmbed.setDescription(
  39.         `${user?.getTag()} is **${(Math.random() * 101) | 0}%** Gay.`
  40.       );
  41.       richEmbed.setThumbnail({ url: user?.getAvatarUrl() });
  42.       richEmbed.setColor((Math.random() * 0xffffff) | 0);
  43.       richEmbed.addField({
  44.         name: '**ID:**',
  45.         value: user.id,
  46.         inline: false
  47.       });
  48.       await message.reply({ content: '', embed: richEmbed });
  49.       return;
  50.     } else {
  51.       const embed = new discord.Embed();
  52.       embed.setTitle(`Gay Calculator 🏳️‍🌈`);
  53.       embed.setDescription(
  54.         `${message.author.getTag()} is **${(Math.random() * 101) | 0}%** Gay.`
  55.       );
  56.       embed.setColor((Math.random() * 0xffffff) | 0);
  57.       embed
  58.         .addField({
  59.           name: '**ID:**',
  60.           value: `${message.author.id}`,
  61.           inline: false
  62.         })
  63.         .setThumbnail({ url: message.author.getAvatarUrl() });
  64.       await message.reply({ content: '', embed: embed });
  65.       return;
  66.     }
  67.   }
  68. );
  69.  
  70. function randomChoice<T>(items: T[]): T {
  71.   return items[(items.length * Math.random()) | 0];
  72. }
  73.  
  74. command.raw('roastme', async (message) => {
  75.   message.addReaction('🔥');
  76.   await sleep(500);
  77.   message.reply(
  78.     randomChoice([
  79.       "No, I'm feeling nice today.",
  80.       'Oh my God, how many times do you use this Command?!',
  81.       'You’re a grey sprinkle on a rainbow cupcake.',
  82.       'If your brain was dynamite, there wouldn’t be enough to blow your hat off.',
  83.       'Light travels faster than sound which is why you seemed bright until you spoke.',
  84.       'You have so many gaps in your teeth it looks like your tongue is in jail.',
  85.       'Your face makes onions cry.',
  86.       'Ask me to Roast you **one** more time. I dare you.',
  87.       `No matter how hard I roast you, just remember that your name isn't Gertrude, or Humphrey.`,
  88.       `Your secrets are always safe with me. I never even listen when you tell me them.`,
  89.       `Hold still. I’m trying to imagine you with personality.`,
  90.       `I’m not insulting you, I’m describing you.`,
  91.       `I’m not a nerd, I’m just smarter than you.`,
  92.       `You bring everyone so much joy...when you leave the room.`,
  93.       `If you’re going to be two-faced, at least make one of them pretty.`,
  94.       `You are like a cloud. When you disappear it’s a beautiful day.`,
  95.       `OH MY GOD! IT SPEAKS!`,
  96.       `Bruh, look at dis dude. Bighead lookin ass MF lmao`
  97.     ])
  98.   );
  99. });
  100.  
  101. command.on(
  102.   'howpretty',
  103.   (args) => ({
  104.     user: args.userOptional()
  105.   }),
  106.   async (message, { user }) => {
  107.     await message.addReaction('💅');
  108.     if (user !== null) {
  109.       const richEmbed = new discord.Embed();
  110.       richEmbed.setTitle(`Prettiness Meter 🥰`);
  111.       richEmbed.setDescription(
  112.         `${user?.getTag()} scored a **${(Math.random() * 101) |
  113.           0}%** on the Prettiness Meter™.`
  114.       );
  115.       richEmbed.setThumbnail({ url: user?.getAvatarUrl() });
  116.       richEmbed.setColor((Math.random() * 0xffffff) | 0);
  117.       richEmbed.addField({
  118.         name: '**ID:**',
  119.         value: user.id,
  120.         inline: false
  121.       });
  122.       await message.reply({ content: '', embed: richEmbed });
  123.       return;
  124.     } else {
  125.       const embed = new discord.Embed();
  126.       embed.setTitle(`Prettiness Meter 🥰`);
  127.       embed.setDescription(
  128.         `${message.author.getTag()} scored a **${(Math.random() * 101) |
  129.           0}%** on the Prettiness Meter™.`
  130.       );
  131.       embed.setColor((Math.random() * 0xffffff) | 0);
  132.       embed
  133.         .addField({
  134.           name: '**ID:**',
  135.           value: `${message.author.id}`,
  136.           inline: false
  137.         })
  138.         .setThumbnail({ url: message.author.getAvatarUrl() });
  139.       await message.reply({ content: '', embed: embed });
  140.       return;
  141.     }
  142.   }
  143. );
  144.  
  145. command.on(
  146.   'howsmart',
  147.   (args) => ({
  148.     user: args.userOptional()
  149.   }),
  150.   async (message, { user }) => {
  151.     await message.addReaction('🧠');
  152.     if (user !== null) {
  153.       const richEmbed = new discord.Embed();
  154.       richEmbed.setTitle(`Intellectual Rating 🤓`);
  155.       richEmbed.setDescription(
  156.         `${user?.getTag()} scored a **${(Math.random() * 101) |
  157.           0}%** on their IQ Test.`
  158.       );
  159.       richEmbed.setThumbnail({ url: user?.getAvatarUrl() });
  160.       richEmbed.setColor((Math.random() * 0xffffff) | 0);
  161.       richEmbed.addField({
  162.         name: '**ID:**',
  163.         value: user.id,
  164.         inline: false
  165.       });
  166.       await message.reply({ content: '', embed: richEmbed });
  167.       return;
  168.     } else {
  169.       const embed = new discord.Embed();
  170.       embed.setTitle(`Intellectual Rating 🤓`);
  171.       embed.setDescription(
  172.         `${message.author.getTag()} scored a **${(Math.random() * 101) |
  173.           0}%** on their IQ Test.`
  174.       );
  175.       embed.setColor((Math.random() * 0xffffff) | 0);
  176.       embed
  177.         .addField({
  178.           name: '**ID:**',
  179.           value: `${message.author.id}`,
  180.           inline: false
  181.         })
  182.         .setThumbnail({ url: message.author.getAvatarUrl() });
  183.       await message.reply({ content: '', embed: embed });
  184.       return;
  185.     }
  186.   }
  187. );
  188.  
  189. command.raw('complimentme', async (message) => {
  190.   message.addReaction('💖');
  191.   await sleep(500);
  192.   message.reply(
  193.     randomChoice([
  194.       `You are more fun than anyone or anything I know, including bubble wrap.`,
  195.       `You are the most perfect you there is.`,
  196.       `You are enough.`,
  197.       `You are one of the strongest people I know.`,
  198.       `You look great today.`,
  199.       `You have the best smile.`,
  200.       `Your outlook on life is amazing.`,
  201.       `You just light up the room.`,
  202.       `You have a cool username!`
  203.     ])
  204.   );
  205. });
  206.  
  207. command.raw('pandafact', async (message) => {
  208.   const req = await fetch('https://some-random-api.ml/facts/panda');
  209.   const data = await req.json();
  210.   await message.reply(
  211.     new discord.Embed({
  212.       title: 'Panda Fact! 📚',
  213.       color: 0x00ff00,
  214.       description: data.fact,
  215.       footer: {
  216.         text: 'powered by https://some-random-api.ml'
  217.       }
  218.     })
  219.   );
  220. });
  221.  
  222. command.raw('birdfact', async (message) => {
  223.   const req = await fetch('https://some-random-api.ml/facts/bird');
  224.   const data = await req.json();
  225.   await message.reply(
  226.     new discord.Embed({
  227.       title: 'Bird Fact! 📚',
  228.       color: 0x00ff00,
  229.       description: data.fact,
  230.       footer: {
  231.         text: 'powered by https://some-random-api.ml'
  232.       }
  233.     })
  234.   );
  235. });
  236.  
  237. command.on(
  238.   'simp',
  239.   (args) => ({
  240.     user: args.userOptional()
  241.   }),
  242.   async (message, { user }) => {
  243.     await message.addReaction('🥺');
  244.     if (user !== null) {
  245.       const richEmbed = new discord.Embed();
  246.       richEmbed.setTitle(`Simp Calculator 💍`);
  247.       richEmbed.setDescription(
  248.         `${user?.getTag()} is **${(Math.random() * 101) | 0}%** Simp.`
  249.       );
  250.       richEmbed.setThumbnail({ url: user?.getAvatarUrl() });
  251.       richEmbed.setColor((Math.random() * 0xffffff) | 0);
  252.       richEmbed.addField({
  253.         name: '**ID:**',
  254.         value: user.id,
  255.         inline: false
  256.       });
  257.       await message.reply({ content: '', embed: richEmbed });
  258.       return;
  259.     } else {
  260.       const embed = new discord.Embed();
  261.       embed.setTitle(`Simp Calculator 💍`);
  262.       embed.setDescription(
  263.         `${message.author.getTag()} is **${(Math.random() * 101) | 0}%** Simp.`
  264.       );
  265.       embed.setColor((Math.random() * 0xffffff) | 0);
  266.       embed
  267.         .addField({
  268.           name: '**ID:**',
  269.           value: `${message.author.id}`,
  270.           inline: false
  271.         })
  272.         .setThumbnail({ url: message.author.getAvatarUrl() });
  273.       await message.reply({ content: '', embed: embed });
  274.       return;
  275.     }
  276.   }
  277. );
  278.  
  279. command.on(
  280.   '8ball',
  281.   (args: { textOptional: () => any }) => ({
  282.     text: args.textOptional()
  283.   }),
  284.   async (message, { text }) => {
  285.     await message.addReaction('🎱');
  286.     if (text === null) {
  287.       await message.reply(
  288.         `Sorry, you're supposed to add something for the 8ball to reply to.`
  289.       );
  290.     } else {
  291.       await message.reply(
  292.         randomChoice([
  293.           `🎱 As I see it, yes.`,
  294.           `🎱 Ask again later.`,
  295.           `🎱 Better not tell you now.`,
  296.           `🎱 Cannot predict now.`,
  297.           `🎱 Concentrate and ask again.`,
  298.           `🎱 Don't count on it.`,
  299.           `🎱 It is certain.`,
  300.           `🎱 It is decidedly so.`,
  301.           `🎱 Most likely.`,
  302.           `🎱 My reply is no.`,
  303.           `🎱 My sources say no.`,
  304.           `🎱 Outlook not so good.`,
  305.           `🎱 Outlook good.`,
  306.           `🎱 Reply hazy, try again.`,
  307.           `🎱 Signs point to yes.`,
  308.           `🎱 Very doubtful.`,
  309.           `🎱 Without a doubt.`,
  310.           `🎱 Yes.`,
  311.           `🎱 Yes, definitely.`,
  312.           `🎱 You may rely on it.`
  313.         ])
  314.       );
  315.     }
  316.   }
  317. );
  318.  
  319. command.on(
  320.   'thotrate',
  321.   (args) => ({
  322.     user: args.userOptional()
  323.   }),
  324.   async (message, { user }) => {
  325.     await message.addReaction('👠');
  326.     if (user !== null) {
  327.       const richEmbed = new discord.Embed();
  328.       richEmbed.setTitle(`Thot Detector 😤`);
  329.       richEmbed.setDescription(
  330.         randomChoice([
  331.           `[☐☐☐☐☐☐☐☐☐](https://www.youtube.com/watch?v=dQw4w9WgXcQ)`,
  332.           `[◻️☐☐☐☐☐☐☐☐](https://www.youtube.com/watch?v=dQw4w9WgXcQ)`,
  333.           `[◻️◻️☐☐☐☐☐☐☐](https://www.youtube.com/watch?v=dQw4w9WgXcQ)`,
  334.           `[◻️◻️◻️☐☐☐☐☐☐](https://www.youtube.com/watch?v=dQw4w9WgXcQ)`,
  335.           `[◻️◻️◻️◻️☐☐☐☐☐](https://www.youtube.com/watch?v=dQw4w9WgXcQ)`,
  336.           `[◻️◻️◻️◻️◻️☐☐☐☐](https://www.youtube.com/watch?v=dQw4w9WgXcQ)`,
  337.           `[◻️◻️◻️◻️◻️◻️☐☐☐](https://www.youtube.com/watch?v=dQw4w9WgXcQ)`,
  338.           `[◻️◻️◻️◻️◻️◻️◻️☐☐](https://www.youtube.com/watch?v=dQw4w9WgXcQ)`,
  339.           `[◻️◻️◻️◻️◻️◻️◻️◻️☐](https://www.youtube.com/watch?v=dQw4w9WgXcQ)`,
  340.           `[◻️◻️◻️◻️◻️◻️◻️◻️◻️](https://www.youtube.com/watch?v=dQw4w9WgXcQ)`
  341.         ])
  342.       );
  343.       richEmbed.setThumbnail({ url: user?.getAvatarUrl() });
  344.       richEmbed.setColor((Math.random() * 0xffffff) | 0);
  345.       richEmbed.addField({
  346.         name: '**ID:**',
  347.         value: user.id,
  348.         inline: false
  349.       });
  350.       await message.reply({ content: '', embed: richEmbed });
  351.       return;
  352.     } else {
  353.       const embed = new discord.Embed();
  354.       embed.setTitle(`Thot Detector 😤`);
  355.       embed.setDescription(
  356.         randomChoice([
  357.           `[☐☐☐☐☐☐☐☐☐](https://www.youtube.com/watch?v=dQw4w9WgXcQ)`,
  358.           `[◻️☐☐☐☐☐☐☐☐](https://www.youtube.com/watch?v=dQw4w9WgXcQ)`,
  359.           `[◻️◻️☐☐☐☐☐☐☐](https://www.youtube.com/watch?v=dQw4w9WgXcQ)`,
  360.           `[◻️◻️◻️☐☐☐☐☐☐](https://www.youtube.com/watch?v=dQw4w9WgXcQ)`,
  361.           `[◻️◻️◻️◻️☐☐☐☐☐](https://www.youtube.com/watch?v=dQw4w9WgXcQ)`,
  362.           `[◻️◻️◻️◻️◻️☐☐☐☐](https://www.youtube.com/watch?v=dQw4w9WgXcQ)`,
  363.           `[◻️◻️◻️◻️◻️◻️☐☐☐](https://www.youtube.com/watch?v=dQw4w9WgXcQ)`,
  364.           `[◻️◻️◻️◻️◻️◻️◻️☐☐](https://www.youtube.com/watch?v=dQw4w9WgXcQ)`,
  365.           `[◻️◻️◻️◻️◻️◻️◻️◻️☐](https://www.youtube.com/watch?v=dQw4w9WgXcQ)`,
  366.           `[◻️◻️◻️◻️◻️◻️◻️◻️◻️](https://www.youtube.com/watch?v=dQw4w9WgXcQ)`
  367.         ])
  368.       );
  369.       embed.setColor((Math.random() * 0xffffff) | 0);
  370.       embed
  371.         .addField({
  372.           name: '**ID:**',
  373.           value: `${message.author.id}`,
  374.           inline: false
  375.         })
  376.         .setThumbnail({ url: message.author.getAvatarUrl() });
  377.       await message.reply({ content: '', embed: embed });
  378.       return;
  379.     }
  380.   }
  381. );
  382.  
  383. command.on(
  384.   'pp',
  385.   (args) => ({
  386.     user: args.userOptional()
  387.   }),
  388.   async (message, { user }) => {
  389.     await message.addReaction('😐');
  390.     if (user !== null) {
  391.       const richEmbed = new discord.Embed();
  392.       richEmbed.setTitle(`PP Measurer (100% REAL)`);
  393.       richEmbed.setDescription(
  394.         randomChoice([
  395.           `**${user?.getTag()}'s PP** \nYou have such a small PP that we can't even measure it lol, kinda embarassing.`,
  396.           `**${user?.getTag()}'s PP** \n8D (Dude, c'mon.)`,
  397.           `**${user?.getTag()}'s PP** \n8=D`,
  398.           `**${user?.getTag()}'s PP** \n8==D`,
  399.           `**${user?.getTag()}'s PP** \n8===D`,
  400.           `**${user?.getTag()}'s PP** \n8====D`,
  401.           `**${user?.getTag()}'s PP** \n8=====D`,
  402.           `**${user?.getTag()}'s PP** \n8======D`,
  403.           `**${user?.getTag()}'s PP** \n8=======D`,
  404.           `**${user?.getTag()}'s PP** \n8========D`,
  405.           `**${user?.getTag()}'s PP** \n8=========D`,
  406.           `**${user?.getTag()}'s PP** \n8==========D`
  407.         ])
  408.       );
  409.       richEmbed.setThumbnail({ url: user?.getAvatarUrl() });
  410.       richEmbed.setColor((Math.random() * 0xffffff) | 0);
  411.       richEmbed.addField({
  412.         name: '**ID:**',
  413.         value: user.id,
  414.         inline: false
  415.       });
  416.       await message.reply({ content: '', embed: richEmbed });
  417.       return;
  418.     } else {
  419.       const embed = new discord.Embed();
  420.       embed.setTitle(`PP Measurer (100% REAL)`);
  421.       embed.setDescription(
  422.         randomChoice([
  423.           `**${message.author.getTag()}'s PP** \nYou have such a small PP that we can't even measure it lol, kinda embarassing.`,
  424.           `**${message.author.getTag()}'s PP** \n8D (Dude, c'mon.)`,
  425.           `**${message.author.getTag()}'s PP** \n8=D`,
  426.           `**${message.author.getTag()}'s PP** \n8==D`,
  427.           `**${message.author.getTag()}'s PP** \n8===D`,
  428.           `**${message.author.getTag()}'s PP** \n8====D`,
  429.           `**${message.author.getTag()}'s PP** \n8=====D`,
  430.           `**${message.author.getTag()}'s PP** \n8======D`,
  431.           `**${message.author.getTag()}'s PP** \n8=======D`,
  432.           `**${message.author.getTag()}'s PP** \n8========D`,
  433.           `**${message.author.getTag()}'s PP** \n8=========D`,
  434.           `**${message.author.getTag()}'s PP** \n8==========D`
  435.         ])
  436.       );
  437.       embed.setColor((Math.random() * 0xffffff) | 0);
  438.       embed
  439.         .addField({
  440.           name: '**ID:**',
  441.           value: `${message.author.id}`,
  442.           inline: false
  443.         })
  444.         .setThumbnail({ url: message.author.getAvatarUrl() });
  445.       await message.reply({ content: '', embed: embed });
  446.       return;
  447.     }
  448.   }
  449. );
  450.  
  451. command.on(
  452.   'stankrate',
  453.   (args) => ({
  454.     user: args.userOptional()
  455.   }),
  456.   async (message, { user }) => {
  457.     await message.addReaction('🦨');
  458.     if (user !== null) {
  459.       const richEmbed = new discord.Embed();
  460.       richEmbed.setTitle(`Stank Meter 💩`);
  461.       richEmbed.setDescription(
  462.         `${user?.getTag()} is **${(Math.random() * 101) | 0}%** Stanky.`
  463.       );
  464.       richEmbed.setThumbnail({ url: user?.getAvatarUrl() });
  465.       richEmbed.setColor((Math.random() * 0xffffff) | 0);
  466.       richEmbed.addField({
  467.         name: '**ID:**',
  468.         value: user.id,
  469.         inline: false
  470.       });
  471.       await message.reply({ content: '', embed: richEmbed });
  472.       return;
  473.     } else {
  474.       const embed = new discord.Embed();
  475.       embed.setTitle(`Stank Meter 💩`);
  476.       embed.setDescription(
  477.         `${message.author.getTag()} is **${(Math.random() * 101) |
  478.           0}%** Stanky.`
  479.       );
  480.       embed.setColor((Math.random() * 0xffffff) | 0);
  481.       embed
  482.         .addField({
  483.           name: '**ID:**',
  484.           value: `${message.author.id}`,
  485.           inline: false
  486.         })
  487.         .setThumbnail({ url: message.author.getAvatarUrl() });
  488.       await message.reply({ content: '', embed: embed });
  489.       return;
  490.     }
  491.   }
  492. );
  493.  
  494. command.on(
  495.   'epicgamer',
  496.   (args) => ({
  497.     user: args.userOptional()
  498.   }),
  499.   async (message, { user }) => {
  500.     await message.addReaction('🎮');
  501.     if (user !== null) {
  502.       const richEmbed = new discord.Embed();
  503.       richEmbed.setTitle(`Epic Gamer Rating`);
  504.       richEmbed.setDescription(
  505.         `${user?.getTag()} is **${(Math.random() * 101) | 0}%** Epic Gamer 😎.`
  506.       );
  507.       richEmbed.setThumbnail({ url: user?.getAvatarUrl() });
  508.       richEmbed.setColor((Math.random() * 0xffffff) | 0);
  509.       richEmbed.addField({
  510.         name: '**ID:**',
  511.         value: user.id,
  512.         inline: false
  513.       });
  514.       await message.reply({ content: '', embed: richEmbed });
  515.       return;
  516.     } else {
  517.       const embed = new discord.Embed();
  518.       embed.setTitle(`Epic Gamer Rating`);
  519.       embed.setDescription(
  520.         `${message.author.getTag()} is **${(Math.random() * 101) |
  521.           0}%** Epic Gamer 😎`
  522.       );
  523.       embed.setColor((Math.random() * 0xffffff) | 0);
  524.       embed
  525.         .addField({
  526.           name: '**ID:**',
  527.           value: `${message.author.id}`,
  528.           inline: false
  529.         })
  530.         .setThumbnail({ url: message.author.getAvatarUrl() });
  531.       await message.reply({ content: '', embed: embed });
  532.       return;
  533.     }
  534.   }
  535. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement