From 4423f499e66195a048fd799d5127939c037fa12c Mon Sep 17 00:00:00 2001 From: Terry Geng Date: Mon, 16 Mar 2020 09:27:37 +0800 Subject: [PATCH] fix: multi-line message, fixed #103 --- command.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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