Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require('discord.js');
- const client = new Discord.Client();
- const prefix = 'hmb '
- const fs = require('fs');
- client.commands = new Discord.Collection();
- const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));
- for(const file of commandFiles){
- const command = require(`./commands/${file}`);
- client.commands.set(command.name, command);
- }
- client.once('ready', () => {
- console.log('BB is online!')
- //Below Status
- //Below Auto-Changing Status
- setInterval(() => {
- const statuses = [
- `hmb help`,
- `BURGERS!!!!`,
- ]
- const status = statuses[Math.floor(Math.random() * statuses.length)]
- client.user.setActivity(status, { type: "STREAMING"}) // Can Be WATCHING, STREAMING, LISTENING
- }, 5000) // Second You Want to Change Status, This Cahnges Every 2 Seconds
- })
- client.on('message', 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 === 'ping'){
- client.commands.get('ping').execute(message, args);
- } else if(command === 'ban'){
- client.commands.get('ban').execute(message, args);
- } else if(command === 'kick'){
- client.commands.get('kick').execute(message, args);
- } else if(command === 'help'){
- client.commands.get('help').execute(message, args);
- } else if(command === 'burger'){
- client.commands.get('burger').execute(message, args);
- } else if(command === 'hungry'){
- client.commands.get('hungry').execute(message, args);
- } else if(command === 'give'){
- client.commands.get('give').execute(message, args);
- } else if(command === 'warn'){
- client.commands.get('warn').execute(message, args, Discord)
- }
- });
- client.login('ADPzMjYTMoIpRzMxNzI5NDI4.YA7MSw.acC1c5VoCeXdKL1tlNxDtih4vMs');
Add Comment
Please, Sign In to add comment