projects
/
personal
/
aptbot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84683f4
)
fixed a bug that caused frequent unnecessary restarts
author
Georgios Atheridis
<atheridis@tutamail.com>
Fri, 9 Sep 2022 09:17:53 +0000
(10:17 +0100)
committer
Georgios Atheridis
<atheridis@tutamail.com>
Fri, 9 Sep 2022 09:17:53 +0000
(10:17 +0100)
aptbot/bot.py
patch
|
blob
|
history
diff --git
a/aptbot/bot.py
b/aptbot/bot.py
index c1e8ef6f68c745122ad33ee0e43ea85d7b288bc7..cabd595706475a4483fc6dd4b0ad892576d4aac5 100644
(file)
--- 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: