I'm trying to make a message counter with discord.py using the on_message event, but for some reason the counter just stays at 1 all the time, here is my code so you can have a better understanding on what I'm talking about.
@cord.event
async def on_message(message):
global message_counter
message_counter = 0
message_counter += 1
message_counter = 0
. - Guillaumemessage_counter
somewhere else, not inon_message
. - Gino Mempinlocal variable 'message_counter' referenced before assignment
- Zen