Config: require Discord ID strings (#18220)

This commit is contained in:
Shadow
2026-02-16 12:22:58 -06:00
committed by GitHub
parent 5d40d47501
commit 1b7301051b
12 changed files with 371 additions and 43 deletions

View File

@@ -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 });