diff --git a/backend/src/utils.ts b/backend/src/utils.ts index fd14070d..f6ea6c91 100644 --- a/backend/src/utils.ts +++ b/backend/src/utils.ts @@ -1280,6 +1280,11 @@ export function resolveUserId(bot: Client, value: string) { return null; } + // Just a user ID? + if (isValidSnowflake(value)) { + return value; + } + // A user mention? const mentionMatch = value.match(/^<@!?(\d+)>$/); if (mentionMatch) { @@ -1293,11 +1298,6 @@ export function resolveUserId(bot: Client, value: string) { if (user) return user.id; } - // Just a user ID? - if (isValidSnowflake(value)) { - return value; - } - return null; }