From: CMDR furrycat Date: Fri, 9 Nov 2018 08:43:17 +0000 (+0000) Subject: Be more verbose when bad heading arguments are supplied. X-Git-Url: http://git.furryclan.net/?a=commitdiff_plain;h=989152b0a9f09d48454949514a4979f7b5d6f4cf;p=furrycat%2Fcatbot.git Be more verbose when bad heading arguments are supplied. --- diff --git a/plugin/heading/heading.py b/plugin/heading/heading.py index ecbaddb..489fe9b 100644 --- a/plugin/heading/heading.py +++ b/plugin/heading/heading.py @@ -35,6 +35,8 @@ class Heading(object): yield from self.help_heading(message) elif command in ['from', 'to']: yield from self.navigate(message, args) + else: + yield from bot.say(message.channel, '?') @asyncio.coroutine def help_heading(self, message, *args): @@ -93,6 +95,11 @@ class Heading(object): else: break + for k in ['from', 'to']: + if k not in parsed: + yield from bot.say(message.channel, '{} where?'.format(k)) + return None + if not ok: log.info('Failed to parse heading. Got: {}'.format(parsed)) yield from bot.say(message.channel, '{}?'.format(arg))