catchall matcher is a special case which is called only when no other skills were matched.
This matcher catches everything - messages and events, if you want to catch only messages you can set the flag
It is useful for displaying a help message to the user to show available commands that the bot replies to, for example:
Return catch-all match decorator.
Decorator that runs the function only if no other skills were matched for a message
messages_only (bool) – Whether to match only on messages, or on all events. Defaults to False.
from opsdroid.skill import Skill from opsdroid.matchers import match_catchall class HelpMessageSkill(Skill): @match_catchall async def help_handler(self, message): # Called when no other skills were matched