Im creating a discord bot and I wanted to know if there is any third party libraries that do the same thing as threading.Timer but with coroutine support for Discord.client.send.
@client.command(aliases = ['Timer'])
async def timer(ctx, secs, *message):
await ctx.send(f"Your timer {message} started, and it is gonna take {secs}secs to stop.")
async def stop_timer():
await ctx.send(f'Your timer: {message} is over, it took {secs} secs.')
def timer_over():
asyncio.run(stop_timer())
simpleTimer = threading.Timer(int(secs), timer_over)
simpleTimer.start()
My code up there, im looking for a function that takes some seconds and after those seconds the function returns a coroutine. Kinda like an alarm.