How to use the sopel.module.require_chanmsg function in sopel

To help you get started, we’ve selected a few sopel 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 PromyLOPh / crocoite / contrib / celerycrocoite.py View on Github external
@require_chanmsg ()
@require_privilege (VOICE)
@example ('a http://example.com')
def archive (bot, trigger):
    """
    Archive a URL to WARC
    """

    try:
        args = archiveparser.parse_args (trigger.group (2).split ())
    except Exception as e:
        bot.reply ('{} -- {}'.format (e.args[0], archiveparser.format_usage ()))
        return
    if not args:
        bot.reply ('Sorry, I don’t understand {}'.format (trigger.group (2)))
        return
    settings = dict (maxBodySize=args.maxBodySize,
github PromyLOPh / crocoite / contrib / celerycrocoite.py View on Github external
@require_chanmsg ()
def status (bot, trigger):
    """
    Retrieve status for a job
    """

    i = trigger.group(2)
    q = bot.memory['crocoite']['q']
    q.put_nowait (('status', trigger, i))
github PromyLOPh / crocoite / contrib / celerycrocoite.py View on Github external
@require_chanmsg ()
def revoke (bot, trigger):
    """
    Cancel (revoke) a job
    """

    i = trigger.group(2)
    q = bot.memory['crocoite']['q']
    q.put_nowait (('revoke', trigger, i))