From 082a3d67e65fb61df6373acbf97098f331665ec6 Mon Sep 17 00:00:00 2001 From: Thorsten Date: Sun, 10 Aug 2025 21:42:43 +0200 Subject: [PATCH] fixes --- pyproject.toml | 2 +- src/distbot/bot/action_worker.py | 1 + src/distbot/bot/bot.py | 2 +- src/distbot/common/message.py | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9baac8c..aefb6c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ classifiers = [ ] dependencies = [ - "slixmpp", + "slixmpp>=1.10.0", "pika", "configobj", "requests", diff --git a/src/distbot/bot/action_worker.py b/src/distbot/bot/action_worker.py index 7fa624a..14d91eb 100644 --- a/src/distbot/bot/action_worker.py +++ b/src/distbot/bot/action_worker.py @@ -119,6 +119,7 @@ class ActionWorker(object): """ item = self.find_scheduled_action_by_mutex(event.mutex) if item: + logger.debug("canceling event %s", item) item.cancel() def run_action(self, action: Action): diff --git a/src/distbot/bot/bot.py b/src/distbot/bot/bot.py index 5b6aa2b..ed1dde7 100644 --- a/src/distbot/bot/bot.py +++ b/src/distbot/bot/bot.py @@ -210,7 +210,7 @@ def run(): nick=conf_get("bot_nickname")) bot.connect() try: - bot.process() + bot.loop.run_forever() except KeyboardInterrupt: bot.disconnect() finally: diff --git a/src/distbot/common/message.py b/src/distbot/common/message.py index a218f0a..c8e22d7 100644 --- a/src/distbot/common/message.py +++ b/src/distbot/common/message.py @@ -17,7 +17,8 @@ def get_words(msg) -> List[str]: return shlex.split(msg["body"]) -def get_nick_from_message(message_obj) -> str: +# TODO clear that up +def get_nick_from_message(message_obj: Message | Presence | dict) -> str: """ Extract the actual nick :type message_obj: Message -- 2.47.3