feat: Add a catch-all handler
This commit is contained in:
parent
e953486494
commit
819b648c87
@ -64,7 +64,8 @@ class PollenModule(BaseModule):
|
||||
self._subcommand_table = {
|
||||
'subscribe': self._subscribe,
|
||||
'unsubscribe': self._unsubscribe,
|
||||
'hilfe': self._help
|
||||
'hilfe': self._help,
|
||||
'*': self._any
|
||||
}
|
||||
self._sleep_duration = self.get_option('sleep_duration', 12 * 3600)
|
||||
|
||||
@ -262,5 +263,9 @@ Level: 0 (Kein Pollenflug) - 3 (Starker Pollenflug)
|
||||
'''
|
||||
self.send_message(msg.from_, body)
|
||||
|
||||
async def _any(self, cmd, msg):
|
||||
self.send_message(msg.from_, 'Unbekannter Befehl')
|
||||
await self._help(cmd, msg)
|
||||
|
||||
def get_instance(base, **kwargs):
|
||||
return PollenModule.get_instance(base, **kwargs)
|
||||
|
Loading…
Reference in New Issue
Block a user