LoginSignup
Majid Ali

Majid Ali

majidaliofficial129@gmail.com

Dropped 4 months ago,

Last activity 4 months ago

2 answers

Try to fetch the member through the guild member manager. An error will be thrown if the member does not exist. Use a try/catch block to handle the possible error.

` async function exists(guild, arg) { try { const member = await guild.members.fetch(arg); return !!member; } catch (err) { console.error(err); return false; } }

`

Question
1 of 1