/** Result of the group message gate evaluation. */
export interface GateResult { /** Whether the message should be blocked (i.e. not processed). */
blocked: boolean; /** Reason for blocking (for logging). */
reason?: string; /** Whether the sender is authorized for slash commands. */
commandAuthorized: boolean;
}
/** Configuration relevant to group message gating. */
export interface GroupGateConfig { /** Normalized allowFrom list (uppercase, `qqbot:` prefix stripped). */
normalizedAllowFrom: string[]; /** *Whethertoignoremessagesthatmentionotherbots. *Whentrue,messagescontaining@mentionsforotherbotIDsaresilentlydropped.
*/
ignoreOtherMentions?: boolean;
}
// Normalize the sender ID for comparison. const normalizedSenderId = senderId.replace(/^qqbot:/i, "").toUpperCase();
// Open gate: empty allowFrom or wildcard means everyone is allowed. const allowAll = normalizedAllowFrom.length === 0 || normalizedAllowFrom.some((e) => e === "*");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.