mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 08:37:41 +00:00
Config: require Discord ID strings (#18220)
This commit is contained in:
@@ -77,7 +77,7 @@ export type MonitorDiscordOpts = {
|
||||
replyToMode?: ReplyToMode;
|
||||
};
|
||||
|
||||
function summarizeAllowList(list?: Array<string | number>) {
|
||||
function summarizeAllowList(list?: string[]) {
|
||||
if (!list || list.length === 0) {
|
||||
return "any";
|
||||
}
|
||||
@@ -352,7 +352,7 @@ export async function monitorDiscordProvider(opts: MonitorDiscordOpts = {}) {
|
||||
continue;
|
||||
}
|
||||
const nextGuild = { ...guildConfig } as Record<string, unknown>;
|
||||
const users = (guildConfig as { users?: Array<string | number> }).users;
|
||||
const users = (guildConfig as { users?: string[] }).users;
|
||||
if (Array.isArray(users) && users.length > 0) {
|
||||
const additions = resolveAllowlistIdAdditions({ existing: users, resolvedMap });
|
||||
nextGuild.users = mergeAllowlist({ existing: users, additions });
|
||||
|
||||
Reference in New Issue
Block a user