Limit reply length so bot doesn't get kicked

master
Tanner Collin 3 years ago
parent ce9613c00c
commit 8b85de2b2a
  1. 6
      mosfet/commands.py

@ -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:

Loading…
Cancel
Save