Skip to content

Adding and getting dynamic triggers #47

Open
@lynxionxs

Description

@lynxionxs

Is it possible to getand add triggers dynamically ?
For example from a redis store.
To be able to add triggers without restarting the bot.

routes = {
    "topic=domath": {
        "math": {
            "triggers": getTriggersFromRedis,
            "args": "<star1> <star2>",
            "handler": doMath
        },
        "wildcard": {
            "triggers": ["*"],
            "args": "<star>",
            "handler": wildcardHandler
        }
    }
}

This way i can also let the bot add new triggers by itself, based on the wildcard message for a topic.
It will search for certain keywords like action verbs, question verbs etc... in the wildcard message, then determine where to create the new trigger.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions