import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime"; import type { TwitchAccountConfig, TwitchChatMessage } from "./types.js";
if (account.requireMention ?? true) { const mentions = extractMentions(message.message); if (!mentions.includes(normalizeLowercaseStringOrEmpty(botUsername))) { return {
allowed: false,
reason: "message does not mention the bot (requireMention is enabled)",
};
}
}
if (account.allowFrom !== undefined) { const allowFrom = account.allowFrom; if (allowFrom.length === 0) { return {
allowed: false,
reason: "sender is not in allowFrom allowlist",
};
} const senderId = message.userId;
if (!senderId) { return {
allowed: false,
reason: "sender user ID not available for allowlist check",
};
}
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.