I'm having fun programming a discord bot for my friend's channel but i need some help: I'm tracking messages sent by a particular friend and trolling him back, but i dont want to troll him on every message he sent. So i thought about putting the bot to sleep for some time after the bot sent a troll message, lets say 20seconds, and then track a future message to troll him again.
I tried using time.sleep() but that just delays the response time of the bot, causing it to sent a lot of messages in a row. I just want do deactivate it for some time after a troll message.
I hid some parts of the accounts info but the base code is like this:
@client.event
async def on_message(message):
await message.channel.send('insert troll massage here')
Thanks in advance!