Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.10 KB | None | 0 0
  1. const { Command } = require('discord-akairo');
  2. const { RichEmbed } = require('discord.js');
  3. const Discord = require('discord.js');
  4. const talkedRecently = new Set();
  5. var colors = [
  6. "00ffdd",
  7. "48ff00",
  8. "f2ff00",
  9. "0000ff",
  10. "ff8800",
  11. "aeff00",
  12. "8c00ff",
  13. "00ff26",
  14. "00ff73"
  15. ];
  16. class CreateChannelCommand extends Command {
  17. constructor() {
  18. super('createchannel', {
  19. aliases: ['createchannel'],
  20. });
  21. }
  22.  
  23. exec(message, client) {
  24. const guildCheck = new RichEmbed().setDescription(` ${message.author}, This command may only be used in a server.`).setColor('#ff0000')
  25.  
  26. if(message.guild === null) return message.channel.send(guildCheck)
  27. var responses = [
  28. "Hold your horses there, buckaroo! The cooldown for this command is **1 hour.**",
  29. "Waiiitttt a minute chief, looks like you got a **1 hour** cooldown!",
  30. "If you try beating the **1 hour** cooldown one more time, I'll rape your asshole like you fucking dropped the soap!",
  31. "You know, I don't like to do this often... but in **1 hour**, your cooldown will be reset, along with a *ban*, free of charge!",
  32. "Your grandma must not be happy with you, especially when you think that you can use this command before the **1 hour** cooldown timer is over, my dood.",
  33. "Hold the fat fucking cock, you can't use this command more than **every hour!** You can try, but your efforts will be futile.",
  34. "I don't think that'll work, dude. If you think you can use this command right now, you lack braincells apparently. Oh well, try again in **1 hour,** I guess!",
  35. "I'll just get straight to the point. The cooldown is **1 hour,** not fucking 2 seconds. We don't want spam, you know?",
  36. "Alright, I don't have much time right now, bud. But if you, yes, you, the **ONE** and **ONLY,** think that you can use **THIS** command more than **once per hour**, then you're fucking delusional.\n\nWhat scale of niggerness are you fucking on? God damn, THIS is why Abraham Lincoln was a piece of shit! Slavery should have fucking existed because of niggers like you! Are you jewish? LET ME GUESS, YOU FUCKING ARE!\n\nI don't get how people in this day and age **STILL** fucking think they can get away with this! Fuck you, and I hope you get brutally tortured to death, like you fucking deserve!"
  37. ]
  38. var response = responses[Math.floor(Math.random() * responses.length)];
  39. if (talkedRecently.has(message.author.id)) {
  40. message.delete();
  41. const nopeEmbed = new Discord.RichEmbed()
  42. .setColor('#ff0000')
  43. .setDescription(`${message.author}` + ", " + response)
  44.  
  45.  
  46. message.channel.send(nopeEmbed);
  47.  
  48. } else {
  49. message.delete()
  50. var color = colors[Math.floor(Math.random() * colors.length)];
  51. const args = message.content.slice(';'.length).split(' ');
  52. const channelName = message.content.substring(15);
  53.  
  54. var channel = message.guild.createChannel(channelName, {
  55. type: 'text',
  56. permissionOverwrites: [{
  57. id: message.guild.id,
  58. deny: ['VIEW_CHANNEL'],
  59. },
  60. {
  61. id: message.author.id,
  62. allow: ['VIEW_CHANNEL'],
  63. },
  64. ],
  65. });
  66. const exampleEmbed = new Discord.RichEmbed()
  67. .setColor(color)
  68. .setDescription(`${message.author}` + ", " + "You've successfully created a channel named " + '"**' + channelName + '**"' + "!")
  69.  
  70.  
  71. message.channel.send(exampleEmbed)
  72. // Adds the user to the set so that they can't talk for a minute
  73. talkedRecently.add(message.author.id);
  74. setTimeout(() => {
  75. // Removes the user from the set after a minute
  76. talkedRecently.delete(message.author.id);
  77. }, 3.6e+6);
  78. }
  79.  
  80.  
  81. }
  82. }
  83. module.exports = CreateChannelCommand;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement