I'm trying to apply a cooldown on the on_message event. how can I do that?
here is the code
import discord
from discord.ext import commands
json
import os
client = commands.Bot(command_prefix = '!')
#more code
@client.event
async def on_message(message):
await open_account(message.author) #opens an account in a json file for this particular user
users = await get_users_data() #returns the users in the json file
user = message.author
#more code
this code is used for a leveling system and I would like it to only happen every 1 minute once so people won't spam, how can that be done?