Also client = discord.Client()
will not work. Use client = commands.Bot(command_prefix=prefix, intents=intents)
Cooldowns are only for commands. Put this under a command – @commands.command()
or @client.command
:
@commands.cooldown(uses, cooldown_time, commands.BucketType.user)
e.g.
@commands.cooldown(1, 30, commands.BucketType.user)
Source: Cooldown For Command On Discord Bot Python
1 use per user and cooldown time is 30s
If you don’t want that. You have to use a counter or time.
solved How can i use discordpy cooldown command for client = discord.Client() [closed]