Cap the considered reply length at 500 chars.
parent
ea0b22b5ec
commit
f5c7ac30f7
2
bot.py
2
bot.py
|
@ -91,7 +91,7 @@ class Bot:
|
||||||
candidates.append(reply)
|
candidates.append(reply)
|
||||||
print("Accepting 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)
|
self.client.reply(reply, comment)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue