LoginSignup
Majid Ali

Majid Ali

majidaliofficial129@gmail.com

Dropped 2 months ago,

Last activity 2 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