File: commandnotfound.py

package info (click to toggle)
errbot 6.1.7%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 3,712 kB
  • sloc: python: 13,831; makefile: 164; sh: 97
file content (10 lines) | stat: -rw-r--r-- 313 bytes parent folder | download
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 "Command fell through: {}".format(msg)