From: Terry Geng Date: Mon, 16 Mar 2020 01:27:37 +0000 (+0800) Subject: fix: multi-line message, fixed #103 X-Git-Url: https://git.0d.be/?p=botaradio.git;a=commitdiff_plain;h=4423f499e66195a048fd799d5127939c037fa12c fix: multi-line message, fixed #103 --- diff --git a/command.py b/command.py index 7e42533..28c38d8 100644 --- a/command.py +++ b/command.py @@ -77,7 +77,8 @@ def send_multi_lines(bot, lines, text, linebreak="
"): for newline in lines: msg += br br = linebreak - if (len(msg) + len(newline)) > (bot.mumble.get_max_message_length() - 4) != 0: # 4 == len("
") + if bot.mumble.get_max_message_length()\ + and (len(msg) + len(newline)) > (bot.mumble.get_max_message_length() - 4): # 4 == len("
") bot.send_msg(msg, text) msg = "" msg += newline