From ec69dd4862354d7eb517c6af49275f9588e7b910 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Fri, 8 Dec 2023 15:42:49 +0200 Subject: [PATCH] bugfix --- src/client/components/Resolver.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/components/Resolver.ts b/src/client/components/Resolver.ts index e36c403..0dbb3f8 100644 --- a/src/client/components/Resolver.ts +++ b/src/client/components/Resolver.ts @@ -149,14 +149,14 @@ class Resolver if (typeof resolveable === 'string' && (/<@!?([0-9]{17,21})>/u).test(resolveable)) { const [ , id ] = resolveable.toString().match(/<@!?([0-9]{17,21})>/u) || []; - const user = await users.fetch(id).catch(null); + const user = await users.fetch(id).catch(() => null); if (user) resolved.push(user); } else if (typeof resolveable === 'string' && (/(id:)?([0-9]{17,21})/u).test(resolveable)) { const [ , , id ] = resolveable.toString().match(/(id:)?([0-9]{17,21})/u) || []; - const user = await users.fetch(id).catch(null); + const user = await users.fetch(id).catch(() => null); if (user) resolved.push(user); } @@ -238,14 +238,14 @@ class Resolver if (typeof resolveable === 'string' && (/<@!?([0-9]{17,21})>/u).test(resolveable)) { const [ , id ] = resolveable.toString().match(/<@!?([0-9]{17,21})>/u) || []; - const member = await members.fetch(id).catch(null); + const member = await members.fetch(id).catch(() => null); if (member) resolved.push(member); } else if (typeof resolveable === 'string' && (/(id:)?([0-9]{17,21})/u).test(resolveable)) { const [ , , id ] = resolveable.toString().match(/(id:)?([0-9]{17,21})/u) || []; - const member = await members.fetch(id).catch(null); + const member = await members.fetch(id).catch(() => null); if (member) resolved.push(member); }