how to check if the user is in a certain guild in discord
const server = client.guilds.cache.get(server_id)
if (server.members.cache.find(user_id)) //Returns true if present in the guild
else //and false if not
how to check if the user is in a certain guild in discord
const server = client.guilds.cache.get(server_id)
if (server.members.cache.find(user_id)) //Returns true if present in the guild
else //and false if not
check user by id discord js
if(!message.author.id ==`329023088517971969` || !message.member.hasPermission(['MANAGE_GUILD'])) return message.channel.send(`You don't have the permissions to do this!`)
<code here>
discord.js check if member is in server
// guild = server
let guild = client.guilds.get('guild ID here'),
USER_ID = '123123123';
if (guild.member(USER_ID)) {
// there is a member in this guild with that ID
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us