• Filter messages that call the given command(s)..

    When a command matches, the match array is stored in a type-safe extension field .commmand of the Message object. First element is the command itself, then the arguments.

    If the matched command was a RegExp, the first element is the command, then the groups from the command regex, then the arguments.

    Parameters

    • commands: MaybeArray<string | RegExp>

      Command(s) the filter should look for (w/out prefix)

    • __namedParameters: { caseSensitive?: boolean; prefixes?: null | MaybeArray<string> } = {}

    Returns filters.UpdateFilter<
        MessageContext
        | BusinessMessageContext,
        { command: string[] },
    >