EnragedPvP

Untitled

Feb 2nd, 2021
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.85 KB | None | 0 0
  1. const Discord = require("discord.js");
  2.  
  3. const bot = new Discord.Client();
  4.  
  5. const prefix ='-' ;
  6.  
  7. const fs = require('fs');
  8.  
  9. Client.command = new Discord.collection();
  10.  
  11. const commandfiles = fs.readdirSync('./command/').filter(file => file.endsWith('.js'));
  12. for(const file of commandfiles){
  13. const command = require(`./command/${file}`);
  14.  
  15. client.command.set(command.name,command);
  16. }
  17.  
  18.  
  19. bot.on('ready', () => {
  20. console.log('bot is ready');
  21. });
  22.  
  23. bot.on('message', function (message) {
  24. if (!message.content.startsWith(prefix) || message.author.bot)
  25. return;
  26.  
  27. const args = message.content.slice(prefix.length).split(/ +/);
  28. const command = args.shift().toLowerCase();
  29.  
  30. if (command === 'wipe') {
  31. message.channel.send('Journey Begins with OPEN BETA this FRIDAY Feb 5th 2021');
  32. } if (command === 'vote') {
  33. message.channel.send('Down below you will find all the links to our servers so that you can vote! We are currently looking into a way players can receive points upon voting');
  34. message.channel.send('Island=https://ark-servers.net/server/260594/',
  35. message.channel.send('Aberration=https://ark-servers.net/server/260596/',
  36. message.channel.send('Center=https://ark-servers.net/server/260595/',
  37. message.channel.send('Extinction=https://ark-servers.net/server/260597/',
  38. message.channel.send('Genesis=https://ark-servers.net/server/260598/',
  39. message.channel.send('Crystal Isles=https://ark-servers.net/server/260599/',
  40. message.channel.send('Ragnarok=https://ark-servers.net/server/260600/',
  41. message.channel.send('Valguero=https://ark-servers.net/server/260601/'))))))));
  42. } if (command === 'commands') {
  43. message.channel.send('The Commands for this server are as follows: (Make sure to use the prefix - )'); {
  44. message.channel.send('**-wipe**= ``lets you know when the next wipe day is``');
  45. message.channel.send('**-vote**= ``gives you voting links for ark-servers.net so you can help our server grow up the ranks!``');
  46. message.channel.send('**-commands**= ``Gives you a commands list``');
  47. } if (command === 'purge')
  48. client.commands.get('clear').execute(message, args)
  49. if (!args[0]) return message.reply("Please enter the amount of messages to clear!");
  50.  
  51. if(isNaN(args[0])) return message.reply("Dude, come on.. Real numbers please");
  52.  
  53. if(args[0] > 100) return message.reply("You can't remove more than 100 messages!");
  54.  
  55. if(args[0] < 1) return message.reply("You have to delete at least one message!");
  56.  
  57. await message.channel.messages.fetch({ limit: args[0]}).then(messages =>{
  58. message.channel.bulkDelete(messages)
  59. });
  60. }
  61. }
  62.  
  63.  
  64.  
  65.  
  66. );
Advertisement
Add Comment
Please, Sign In to add comment