prevent flooding via .py command
This commit is contained in:
parent
aee180767d
commit
bee166f985
|
@ -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.')
|
||||
|
|
Loading…
Reference in New Issue
Block a user