Cap the considered reply length at 500 chars.

master
float-trip 2023-07-10 00:52:26 +00:00
parent ea0b22b5ec
commit f5c7ac30f7
1 changed files with 1 additions and 1 deletions

2
bot.py
View File

@ -91,7 +91,7 @@ class Bot:
candidates.append(reply)
print("Accepting reply.")
reply = max(candidates, key=utils.reply_length)
reply = max(candidates, key=lambda r: min(utils.reply_length(r, 500)))
self.client.reply(reply, comment)