Fix Logging

Portainer does not support buffered output, replace using Bot status instead
This commit is contained in:
Aadi Desai 2021-11-30 14:15:48 +00:00
parent 43057b949c
commit fdb7a2bb6e
No known key found for this signature in database
GPG key ID: CFFFE425830EF4D9

8
app.py
View file

@ -70,7 +70,13 @@ async def on_message(message):
print("Replied to " + message.author.name + " with Dad Joke") print("Replied to " + message.author.name + " with Dad Joke")
else: else:
idleMessageCounter += 1 idleMessageCounter += 1
print("Idle Message Counter: " + str(idleMessageCounter), end="\r") if idleMessageCounter % 5 == 0:
await bot.change_presence(
status=discord.Status.online,
activity=discord.Game(
name="with Godlina [" + str(idleMessageCounter) + "]"
),
)
with open("secrets.yaml") as stream: with open("secrets.yaml") as stream: