Help me (MaxListeners)

Something like this:

client.on(`message`, async function (msg){

});

I think you did this for every single command when instead you should probably put all of your commands in one like this.

client.on(`message`, async function (msg){
   if(msg.content.startsWith(`!hello`)){
      msg.reply(`Hi!`);
   }

   if(msg.content.startsWith(`!cya`)){
      msg.reply(`Bye!`);
   }
});
1 Like