From 30bbda31460ffd512c410835f480a105ab6c6252 Mon Sep 17 00:00:00 2001 From: Georgios Atheridis Date: Fri, 9 Sep 2022 10:17:53 +0100 Subject: [PATCH] fixed a bug that caused frequent unnecessary restarts --- aptbot/bot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aptbot/bot.py b/aptbot/bot.py index c1e8ef6..cabd595 100644 --- a/aptbot/bot.py +++ b/aptbot/bot.py @@ -24,6 +24,8 @@ class Commands(Enum): PRIVMSG = "PRIVMSG" JOIN = "JOIN" PART = "PART" + PING = "PING" + PONG = "PONG" @dataclass @@ -168,7 +170,7 @@ class Bot(ABCBot): logger.info(f"> {received_msg}") if received_msg == "PING :tmi.twitch.tv": self._send_command("PONG :tmi.twitch.tv") - return Message() + return Message(command=Commands.PING) elif received_msg == ":tmi.twitch.tv RECONNECT": self._restart_connection() elif not received_msg: -- 2.30.2