Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require('discord.js');
- const bot = new Discord.Client();
- bot.commands = new Discord.Collection();
- const { token, prefix} = require('./botconfig.json');
- const fs = require('fs');
- bot.commands = new Discord.Collection();
- const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));
- for(const file of commandFiles) {
- const command = require(`./commands/${file}`);
- bot.command.set(command.name, command);
- }
- bot.on('ready', () => {
- console.log('Bot is online!');
- bot.user.setActivity('Popsiz Group', { type: "WATCHING" })
- .then(presence => console.log(`Activity set to ${presence.activities[0].name}`))
- .catch(console.error);
- })
- bot.on("message", message => {
- if (message.author.bot) return
- const args = message.content.slice(prefix.length).trim().split(/ +/g);
- const command = args.shift().toLowerCase();
- })
- bot.login(token);
Advertisement
Add Comment
Please, Sign In to add comment