Check Ban list

Hello, Is it possible to check if a person is already in the ban list? I looked on the internet but nothing worked (maybe I made a mistake). For the moment I have this code that allows to ban a person only if he has the ban permissions (otherwise there is a message Missing Permissions)
6 Replies
d.js toolkit
d.js toolkitâ€ĸ17mo 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!
d.js docs
d.js docsâ€ĸ17mo ago
method GuildBanManager#fetch() Fetches ban(s) from Discord.
𝑆𝑘đ‘ĸ𝑙𝑙đ‘Ļ āļž
Thank you. And in what way is it best to ban a user between these two formats?
𝑆𝑘đ‘ĸ𝑙𝑙đ‘Ļ āļž
Between guild.members.ban and guild.bans.create Thank you. And if I want to add a reason to the ban with guild.members.ban, I have to write it like this?
guild.members.ban(user, [
.reason: 'somethings'
])
guild.members.ban(user, [
.reason: 'somethings'
])
So this way it's okay ?
guild.members.ban(user, {
.reason: 'somethings'
})
guild.members.ban(user, {
.reason: 'somethings'
})
𝑆𝑘đ‘ĸ𝑙𝑙đ‘Ļ āļž
the . was a mistake sorry I thought they were [] because that's what it says in the doc. Thank you very much for your help
𝑆𝑘đ‘ĸ𝑙𝑙đ‘Ļ āļž
Okay, I understand. Thank you very much for your help
Want results from more Discord servers?
Add your server