prevent flooding via .py command

This commit is contained in:
iou1name 2019-09-13 18:54:36 -04:00
parent aee180767d
commit bee166f985

View File

@ -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.')