Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require("discord.js");
- const bot = new Discord.Client();
- const prefix ='-' ;
- const fs = require('fs');
- Client.command = new Discord.collection();
- const commandfiles = fs.readdirSync('./command/').filter(file => file.endsWith('.js'));
- for(const file of commandfiles){
- const command = require(`./command/${file}`);
- client.command.set(command.name,command);
- }
- bot.on('ready', () => {
- console.log('bot is ready');
- });
- bot.on('message', function (message) {
- if (!message.content.startsWith(prefix) || message.author.bot)
- return;
- const args = message.content.slice(prefix.length).split(/ +/);
- const command = args.shift().toLowerCase();
- if (command === 'wipe') {
- message.channel.send('Journey Begins with OPEN BETA this FRIDAY Feb 5th 2021');
- } if (command === 'vote') {
- 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');
- message.channel.send('Island=https://ark-servers.net/server/260594/',
- message.channel.send('Aberration=https://ark-servers.net/server/260596/',
- message.channel.send('Center=https://ark-servers.net/server/260595/',
- message.channel.send('Extinction=https://ark-servers.net/server/260597/',
- message.channel.send('Genesis=https://ark-servers.net/server/260598/',
- message.channel.send('Crystal Isles=https://ark-servers.net/server/260599/',
- message.channel.send('Ragnarok=https://ark-servers.net/server/260600/',
- message.channel.send('Valguero=https://ark-servers.net/server/260601/'))))))));
- } if (command === 'commands') {
- message.channel.send('The Commands for this server are as follows: (Make sure to use the prefix - )'); {
- message.channel.send('**-wipe**= ``lets you know when the next wipe day is``');
- message.channel.send('**-vote**= ``gives you voting links for ark-servers.net so you can help our server grow up the ranks!``');
- message.channel.send('**-commands**= ``Gives you a commands list``');
- } if (command === 'purge')
- client.commands.get('clear').execute(message, args)
- if (!args[0]) return message.reply("Please enter the amount of messages to clear!");
- if(isNaN(args[0])) return message.reply("Dude, come on.. Real numbers please");
- if(args[0] > 100) return message.reply("You can't remove more than 100 messages!");
- if(args[0] < 1) return message.reply("You have to delete at least one message!");
- await message.channel.messages.fetch({ limit: args[0]}).then(messages =>{
- message.channel.bulkDelete(messages)
- });
- }
- }
- );
Advertisement
Add Comment
Please, Sign In to add comment