Fix datetime shit again^2.
Signed-off-by: Abdulkadir Furkan Şanlı <me@abdulocra.cy>
This commit is contained in:
parent
821ed5ab08
commit
f7f5857ef1
4
main.py
4
main.py
@ -198,7 +198,7 @@ async def message_callback(client, room, event):
|
||||
) # milisec to sec
|
||||
current_time = datetime.datetime.now(datetime.UTC)
|
||||
|
||||
if body == "!parkerbot" and current_time - timestamp_sec < timedelta(
|
||||
if body == "!parkerbot" and current_time - timestamp_sec < datetime.timedelta(
|
||||
seconds=30
|
||||
):
|
||||
intro_message = (
|
||||
@ -227,7 +227,7 @@ async def message_callback(client, room, event):
|
||||
},
|
||||
)
|
||||
|
||||
if body == "!pow" and current_time - timestamp_sec < timedelta(seconds=30):
|
||||
if body == "!pow" and current_time - timestamp_sec < datetime.timedelta(seconds=30):
|
||||
playlist_link = f"https://www.youtube.com/playlist?list={playlist_id}"
|
||||
reply_msg = f"{sender}, here's the playlist of the week: {playlist_link}"
|
||||
await client.room_send(
|
||||
|
Loading…
Reference in New Issue
Block a user