From bee166f9857e9d5e75e4ac8150a988091974f858 Mon Sep 17 00:00:00 2001 From: iou1name Date: Fri, 13 Sep 2019 18:54:36 -0400 Subject: [PATCH] prevent flooding via .py command --- modules/calc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/calc.py b/modules/calc.py index 6e9e86f..29d1d1e 100755 --- a/modules/calc.py +++ b/modules/calc.py @@ -41,8 +41,9 @@ def py(bot, trigger): res = requests.get(uri + query) res.raise_for_status() answer = res.text + answer = answer[:2000] if answer: #bot.msg can potentially lead to 3rd party commands triggering. - bot.msg(answer) + bot.msg(answer, length=300) else: bot.reply('Sorry, no result.')