discord.py rewrite: How do i make a slash command only able to be ran 1 time every five hours

Viewed 25

How do i made a 5 hour cooldown for my slash command?

(Im NOT using pycord, im using discord.py)

My code:

@slashDev.command(name='requestfeature', description='Requests feature to the bot devs') async def requestfeature(interaction: discord.Interaction, msg : str):
    webhook = SyncWebhook.from_url("https://discord.com/api/webhooks/donttryme
    webhook.send(f"`request: {msg} from {interaction.user}`")
    await interaction.response.send_message('**Thanks for requesting a feature**', ephemeral=True)
1 Answers
Related