forked from Galactic/galactic-bot
bugfix
This commit is contained in:
parent
ddd695084a
commit
ec69dd4862
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user