claudius-chat-widget
    Preparing search index...

    Interface CannedRule

    A single intent-matching rule for pluginCannedResponses.

    interface CannedRule {
        match: string | RegExp | ((content: string) => boolean);
        reply: string | PluginReply;
    }
    Index

    Properties

    Properties

    match: string | RegExp | ((content: string) => boolean)

    How to match the user's message:

    • string — case-insensitive substring match (see CannedResponsesOptions.caseSensitive).
    • RegExp — tested against the message content.
    • function — receives the content and returns whether it matches.
    reply: string | PluginReply

    The reply rendered when the rule matches.