Compare commits

...

2 Commits

Author SHA1 Message Date
aee180767d added arbitrary cutoff to wikipedia module 2019-09-06 12:44:24 -04:00
bc3ef25b98 fixed .upwulf overriding .updick 2019-09-06 12:43:39 -04:00
2 changed files with 2 additions and 1 deletions

View File

@ -38,7 +38,7 @@ def updick(bot, trigger):
@commands('upwulf') @commands('upwulf')
def updick(bot, trigger): def upwulf(bot, trigger):
""".upwulf - Returns the uptime of Fulvia, measured in Adalwulfs.""" """.upwulf - Returns the uptime of Fulvia, measured in Adalwulfs."""
if trigger.group(2): if trigger.group(2):
if trigger.group(2) in bot.users: if trigger.group(2) in bot.users:

View File

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