Limit reply length so bot doesn't get kicked

This commit is contained in:
Tanner Collin 2021-04-24 23:50:52 +00:00
parent ce9613c00c
commit 8b85de2b2a
1 changed files with 5 additions and 1 deletions

View File

@ -520,7 +520,11 @@ class Commands:
pass
if reply:
print(reply)
print('Reply:', reply)
if len(reply) >= 256:
reply = 'reply too long, check console'
if private and not reply.startswith('/'):
self.g.chat.send('/m ' + sender + ' ' + reply)
else: