Trying to ban and unban a user directly after each other

msg.mentions.members.first().unban(msg.mentions.members.id)
^

TypeError: msg.mentions.members.first(...).unban is not a function
msg.mentions.members.first().unban(msg.mentions.members.id)
^

TypeError: msg.mentions.members.first(...).unban is not a function
Here is the error im getting, and here is the code:
msg.mentions.members.first().ban().then(
msg.mentions.members.first().unban(msg.mentions.members.id)
)
msg.mentions.members.first().ban().then(
msg.mentions.members.first().unban(msg.mentions.members.id)
)
2 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Alex Kuma
Alex KumaOP2y ago
that is why i tried doing .unban(msg.mentions.members.id) @qjuh sorry just tryna understand :) Alright ill try it @qjuh @pauel
msg.mentions.members.first().ban({ days: 7, reason: args.join("Hacked") }).then(
msg.guild.members.unban(msg.guild.members.id)
)
msg.mentions.members.first().ban({ days: 7, reason: args.join("Hacked") }).then(
msg.guild.members.unban(msg.guild.members.id)
)
` It doesn't crash anymore, yet it also doesn't unban the user :/ oh shit, so like this ? msg.mentions.members.id Ohhhh yea oversaw Thank you, ill test it again Alright everything works, thank you @pauel and @qjuh 👍
Want results from more Discord servers?
Add your server