File: commandnotfound.py

package info (click to toggle)
errbot 6.2.0%2Bds-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,848 kB
  • sloc: python: 11,573; makefile: 162; sh: 97
file content (10 lines) | stat: -rw-r--r-- 305 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
from errbot import BotPlugin, cmdfilter


class TestCommandNotFoundFilter(BotPlugin):
    @cmdfilter(catch_unprocessed=True)
    def command_not_found(self, msg, cmd, args, dry_run, emptycmd=False):
        if not emptycmd:
            return msg, cmd, args

        return f"Command fell through: {msg}"