Add a couple of debug log messages to wordbot when a new round is started/finished

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2022-05-30 17:42:18 -07:00
parent f105ba4eef
commit 0bb17050ec

View File

@@ -282,6 +282,7 @@ class Wordbot(Plugin):
pass
def start_round(self, channel: str, allow_early_end: bool = False):
log.debug("Starting new wordbot round for %s", channel)
# Choose words for new round
with open(self.words_path) as fp:
words = [word.strip() for word in fp]
@@ -290,6 +291,7 @@ class Wordbot(Plugin):
self.db.start_round(channel, self.duration, words, allow_early_end)
def end_round(self, conn: IrcProtocol, channel: str):
log.debug("Ending wordbot round for %s", channel)
# Sort the scores
scores = sorted(self.db.scores(channel).items(), key=lambda value: -value[1])
# Add their ordering