Skip to content

Commit

Permalink
Store chat messages (#1084)
Browse files Browse the repository at this point in the history
  • Loading branch information
AttackingOrDefending authored Feb 3, 2025
1 parent ca5f487 commit e61f19f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def __init__(self, game: model.Game, engine: EngineWrapper, li: LICHESS_TYPE, ve
self.li = li
self.version = version
self.challengers = challenge_queue
self.messages: list[ChatLine] = []

command_prefix = "!"

Expand All @@ -55,6 +56,7 @@ def react(self, line: ChatLine) -> None:
:param line: Information about the message.
"""
self.messages.append(line)
logger.info(f"*** {self.game.url()} [{line.room}] {line.username}: {line.text}")
if line.text[0] == self.command_prefix:
self.command(line, line.text[1:].lower())
Expand Down

0 comments on commit e61f19f

Please sign in to comment.