member.bannable shows false even everything is alright

let Ecolor = client.embedColor;
const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]);

let rea = `${message.member.user.username} ( ${message.member.id} )`

const emd7 = new EmbedBuilder()
.setColor(client.embedColor)
.setAuthor({name: `Invalid Process:`, iconURL: message.member.displayAvatarURL()})

if(!user) return message.reply({embeds: [emd7.setDescription(`You forgot to mention the member who to ban.`)]});

if(user ===undefined) return message.reply({embeds: [emd7.setDescription(`Something suspicious, member not found.`)]});

if(user.id === client.user.id) return message.reply({embeds: [emd7.setDescription(`UwU, don't ban me. I'll be more good.`)]});

if(user.id === message.author.id) return message.reply({embeds: [emd7.setDescription(`You can't ban yourself.`)]});

if(user.id === message.guild.ownerId) return message.reply({embeds: [emd7.setDescription(`I can't ban the server owner, but the server owner can ban you.`)]});



if(!user.bannable){
return message.reply({embeds: [emd7.setDescription(`Check my roles, is it at the top? I can't ban that member.`)]});
}
let Ecolor = client.embedColor;
const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]);

let rea = `${message.member.user.username} ( ${message.member.id} )`

const emd7 = new EmbedBuilder()
.setColor(client.embedColor)
.setAuthor({name: `Invalid Process:`, iconURL: message.member.displayAvatarURL()})

if(!user) return message.reply({embeds: [emd7.setDescription(`You forgot to mention the member who to ban.`)]});

if(user ===undefined) return message.reply({embeds: [emd7.setDescription(`Something suspicious, member not found.`)]});

if(user.id === client.user.id) return message.reply({embeds: [emd7.setDescription(`UwU, don't ban me. I'll be more good.`)]});

if(user.id === message.author.id) return message.reply({embeds: [emd7.setDescription(`You can't ban yourself.`)]});

if(user.id === message.guild.ownerId) return message.reply({embeds: [emd7.setDescription(`I can't ban the server owner, but the server owner can ban you.`)]});



if(!user.bannable){
return message.reply({embeds: [emd7.setDescription(`Check my roles, is it at the top? I can't ban that member.`)]});
}
No description
No description
No description
No description
No description
No description
No description
No description
No description
5 Replies
d.js toolkit
d.js toolkit15mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Ferklen
Ferklen15mo ago
does the 'flare' role has the admin permissions or the permissions come from another role
Ishh
IshhOP15mo ago
Bot role has it The perms The bot has only one role
Ishh
IshhOP15mo ago
No description
Ishh
IshhOP15mo ago
[
{ id: '1157966314070093845', name: '@everyone', pos: 0, raw: 0 },
{ id: '1157967083762614322', name: 'Flare 🚀', pos: 6, raw: 8 },
{ id: '1158460274332938385', name: 'NQN', pos: 4, raw: 6 },
{ id: '1159866157394825278', name: 'VizionX', pos: 3, raw: 5 },
{ id: '1160219044520140815', name: 'Dank Memer', pos: 2, raw: 4 },
{ id: '1160511697077936230', name: 'Flantic', pos: 1, raw: 3 },
{ id: '1160590688652628160', name: 'good role', pos: 5, raw: 7 }
]
[
{ id: '1157966314070093845', name: '@everyone', pos: 0, raw: 0 },
{ id: '1157967083762614322', name: 'Flare 🚀', pos: 6, raw: 8 },
{ id: '1158460274332938385', name: 'NQN', pos: 4, raw: 6 },
{ id: '1159866157394825278', name: 'VizionX', pos: 3, raw: 5 },
{ id: '1160219044520140815', name: 'Dank Memer', pos: 2, raw: 4 },
{ id: '1160511697077936230', name: 'Flantic', pos: 1, raw: 3 },
{ id: '1160590688652628160', name: 'good role', pos: 5, raw: 7 }
]
Want results from more Discord servers?
Add your server