Compare commits
No commits in common. "580a89c86fb498685991adcf3ec702e19e6bf1b5" and "f7f5857ef1b6e355f828df0e027109955fda85ea" have entirely different histories.
580a89c86f
...
f7f5857ef1
@ -2,5 +2,6 @@ services:
|
||||
parkerbot:
|
||||
build: .
|
||||
env_file: .env
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./data:/data
|
||||
|
8
main.py
8
main.py
@ -212,7 +212,9 @@ async def message_callback(client, room, event):
|
||||
content={"msgtype": "m.text", "body": intro_message},
|
||||
)
|
||||
with open("./parker.gif", "rb") as gif_file:
|
||||
response = await client.upload(gif_file, content_type="image/gif")
|
||||
response = await client.upload(
|
||||
gif_file.read(), content_type="image/gif"
|
||||
)
|
||||
gif_uri = response.content_uri
|
||||
await client.room_send(
|
||||
room_id=room_id,
|
||||
@ -225,9 +227,7 @@ async def message_callback(client, room, event):
|
||||
},
|
||||
)
|
||||
|
||||
if body == "!pow" and current_time - timestamp_sec < datetime.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