How to use errbot - 10 common examples

To help you get started, we’ve selected a few errbot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github errbotio / errbot / tests / borken_plugin / broken.py View on Github external
    @botcmd
    def hello(self, msg, args):
        """ this command says hello """
        return 'Hello World !'
github errbotio / errbot / tests / base_backend_tests.py View on Github external
    @botcmd
    def return_args_as_str(self, mess, args):
        return "".join(args)
github errbotio / errbot / tests / dyna_plugin / dyna.py View on Github external
    @botcmd
    def remove_saw(self, msg, args):
        self.destroy_dynamic_plugin('saw')
        return 'removed'
github errbotio / errbot / tests / base_backend_tests.py View on Github external
    @botcmd(template='args_as_md')
    def yield_args_as_md(self, mess, args):
        for arg in args:
            yield {'args': [arg]}
github errbotio / errbot / tests / dependent_plugins / double.py View on Github external
from errbot import BotPlugin


class Double(BotPlugin):
    pass
github errbotio / errbot / tests / base_backend_tests.py View on Github external
    @arg_botcmd('--last-name', dest='last_name', unpack_args=False)
    def returns_first_name_last_name_without_unpacking(self, mess, args):
        return "%s %s" % (args.first_name, args.last_name)
github errbotio / errbot / tests / base_backend_tests.py View on Github external
    @arg_botcmd('value', type=str)
    @arg_botcmd('--count', dest='count', type=int)
    def returns_value_repeated_count_times(self, mess, value=None, count=None):
        # str * int gives a repeated string
        return value * count
github errbotio / errbot / tests / base_backend_tests.py View on Github external
    @arg_botcmd('--first-name', dest='first_name')
    @arg_botcmd('--last-name', dest='last_name')
    def returns_first_name_last_name(self, mess, first_name=None, last_name=None):
        return "%s %s" % (first_name, last_name)
github errbotio / errbot / tests / dummy_plugin / dummy.py View on Github external
    @re_botcmd(pattern=r"plz dont match this")
    def re_foo(self, msg, match):
        """This runs re_foo."""
        return 'bar'
github errbotio / errbot / tests / base_backend_tests.py View on Github external
    @re_botcmd(pattern=r'^regex command with prefix$', prefixed=True)
    def regex_command_with_prefix(self, mess, match):
        return "Regex command"