Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require('discord.js');
- const client = new Discord.Client({ intents: ["GUILDS", "GUILD_MESSAGES"] });
- const prefix = '-';
- const fs = require('fs');
- client.command = 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('nullpointbot is online');
- });
- client.on('messageCreate', 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=='youtube'){
- }
- });
- client.login('OTc2NjM1MTc2MDU2NjUxODE3.GkWpps.GXoVehL-ExjblUKkn51-6T97PqsTzJP3LZqBXA');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement