From 989152b0a9f09d48454949514a4979f7b5d6f4cf Mon Sep 17 00:00:00 2001 From: CMDR furrycat Date: Fri, 9 Nov 2018 08:43:17 +0000 Subject: [PATCH] Be more verbose when bad heading arguments are supplied. --- plugin/heading/heading.py | 7 +++++++ 1 file changed, 7 insertions(+) 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)) -- 2.7.4