aboutsummaryrefslogtreecommitdiff
path: root/velascobot2/bot.py
diff options
context:
space:
mode:
authorGuillermo Serrahima <dev@vylion.com>2026-02-02 04:15:55 +0100
committerGuillermo Serrahima <dev@vylion.com>2026-02-02 04:15:55 +0100
commit38c452051e7ff7a9b423b8d5be19a434c4d2f6ef (patch)
treec79867863a4fd0938db7a0618c11f02828087f1f /velascobot2/bot.py
parentfb915558d45d175b82331615390d18f29302f9a9 (diff)
downloadvelascobot2-38c452051e7ff7a9b423b8d5be19a434c4d2f6ef.tar.xz
velascobot2-38c452051e7ff7a9b423b8d5be19a434c4d2f6ef.zip
More misc corrections
Diffstat (limited to 'velascobot2/bot.py')
-rw-r--r--velascobot2/bot.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/velascobot2/bot.py b/velascobot2/bot.py
index 5914906..9659a8d 100644
--- a/velascobot2/bot.py
+++ b/velascobot2/bot.py
@@ -170,8 +170,7 @@ class Bot:
)
)
- if self.testing:
- app.add_error_handler(error_handler)
+ app.add_error_handler(error_handler)
self.app = app
@@ -380,10 +379,9 @@ class Bot:
for chat in self.messenger.get_all_chats():
if check(chat):
try:
+ logger.info(f"Sending announcement to {chat.id}")
await self.send(chat.id, Response.TEXT, announcement)
- logger.info(
- "Sending announcement to chat {}".format(chat.id)
- )
+ time.sleep(1)
except Exception:
pass
@@ -404,6 +402,7 @@ class Bot:
return "group" in chat.type or chat.id in self.motd_chats
wake_text = random.choice(self.motd_list)
+ logger.info(f"Printing message of the day: {wake_text}")
await self.announce(wake_text, valid_chat)
async def should_reply(self, message: Message, chat: ChatData) -> bool: