EnragedPvP

Untitled

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