Skip to content
Advertisement

My bot wont run the on_message/on_ready event properly

When i tried to start up my bot, it wouldnt run the on_message event and it wouldnt run the on_ready event either.

Here is my code:

JavaScript

I have tried to get rid of the on_message event to see if that was the problem, and it didnt fix it. Does anyone have a fix for this?

Advertisement

Answer

You are not actually using the correct decorators for the on_ready and on_message. Any decorator should start with a @, notice how you are only using client.event instead of @client.event.

Also make sure to activate some intents for your bot or you will not be able to access some specific information.

JavaScript

Your corrected code should be something like this:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement