Skip to content

Commit 3089a1b

Browse files
committed
fix: tweak message buffering to support guild MOTD
1 parent a6e8cb4 commit 3089a1b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

core/minecraft_bot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def chat(this, message, _, raw_message, *args):
136136
return
137137

138138
# large block messages
139-
if message == "-----------------------------------------------------" and self.wait_response:
139+
if message.startswith("-----") and message.endswith("-----") and self.wait_response:
140140
if SettingsConfig.printChat:
141141
print(f"{Color.GREEN}Minecraft{Color.RESET} > End of chat buffer")
142142
self.wait_response = False
@@ -152,7 +152,7 @@ def chat(this, message, _, raw_message, *args):
152152
print(f"{Color.GREEN}Minecraft{Color.RESET} > No useful text found, discarding")
153153
message_buffer.clear()
154154
return
155-
if message == "-----------------------------------------------------" and not self.wait_response:
155+
if message.startswith("-----") and message.endswith("-----") and not self.wait_response:
156156
self.wait_response = True
157157
if SettingsConfig.printChat:
158158
print(f"{Color.GREEN}Minecraft{Color.RESET} > Buffering chat...")

0 commit comments

Comments
 (0)