1bot.on('ready', () => {
2 console.log('Logged in as TEMPLATE');
3 });
4//link to the dev portal to make your own discord bot here: https://discord.com/developers/applications
1// client.on('message', message => {
2if (!message.content.startsWith(prefix) || message.author.bot) return;
3
4const args = message.content.slice(prefix.length).trim().split(' ');
5const command = args.shift().toLowerCase();
6// the rest of your code
7
1// using the new `command` variable, this makes it easier to manage!
2// you can switch your other commands to this format as well
3else if (command === 'args-info') {
4 if (!args.length) {
5 return message.channel.send(`You didn't provide any arguments, ${message.author}!`);
6 }
7
8 message.channel.send(`Command name: ${command}\nArguments: ${args}`);
9}
10