added arbitrary cutoff to wikipedia module

This commit is contained in:
iou1name 2019-09-06 12:44:24 -04:00
parent bc3ef25b98
commit aee180767d

View File

@ -33,6 +33,7 @@ def say_snippet(bot, query, show_url=True):
msg = f'[\x0304WIKIPEDIA\x03] \x0310{page_name}\x03 | \x0312"{snippet}"'
if show_url:
msg = msg + f"\x03 | \x0307https://en.wikipedia.org/wiki/{query}"
msg = msg[:270] + '...' # arbitrary cutoff
bot.msg(msg)