Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
2.4.6: Minor bug fix
Browse files Browse the repository at this point in the history
* Fixes pmsg back and fourth between bots
  • Loading branch information
showierdata9978 committed Mar 25, 2023
1 parent f0a3d97 commit 2fe4ea5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion MeowerBot/Bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ class Bot:
"__meowerbot__cloudlink_trust",
]

BOT_NO_PMSG_RESPONSE = [
"I:500 | Bot",
"I: 500 | Bot"
]

def _t_ping(self):
while True:
time.sleep(60)
Expand Down Expand Up @@ -296,7 +301,7 @@ def __handle_packet__(self, packet):
self.run_cb(packet["cmd"], args=(packet["val"], listener))


if packet["cmd"] == "pmsg":
if (packet["cmd"] == "pmsg") and (packet["val"] not in self.BOT_NO_PMSG_RESPONSE):
self.wss.sendPacket({
"cmd": "pmsg",
"val": "I:500 | Bot",
Expand Down
2 changes: 1 addition & 1 deletion MeowerBot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""

__version__ = "2.4.5"
__version__ = "2.4.6"


# Public library imports
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "MeowerBot"
version = "2.4.5"
version = "2.4.6"
description = "A meower bot lib for py"
authors = ["showierdata9978 <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 2fe4ea5

Please sign in to comment.