You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if msg.date >= data[user_id]['timestamp'] + flt.data:
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
TypeError: unsupported operand type(s) for +: 'datetime.datetime' and 'int'
can be fixed by if msg.date >= data[user_id]['timestamp'] + timedelta(seconds=flt.data):
on line 24 on cooldown.py
and on line 3 from datetime import datetime, timedelta
and you can change the task function to this for nice animation
asyncdeftask(msg, warn=False, sec=None):
ifwarn:
user=msg.from_userids=awaitmsg.reply(f"Sorry {user.mention}, you're in cooldown now, wait for `{sec}`s to use command again..")
foriinrange(sec):
awaitids.edit(f"Sorry {user.mention}, you're in cooldown now, wait for `{sec-(i+1)}`s to use command again..")
awaitasyncio.sleep(1)
awaitids.edit(f"Alright {user.mention}, your cooldown is over you can command again.")
awaitasyncio.sleep(3)
awaitids.delete()
The text was updated successfully, but these errors were encountered:
can be fixed by
if msg.date >= data[user_id]['timestamp'] + timedelta(seconds=flt.data):
on line 24 on cooldown.py
and on line 3
from datetime import datetime, timedelta
and you can change the task function to this for nice animation
The text was updated successfully, but these errors were encountered: