Updated unban command
This commit is contained in:
@@ -37,6 +37,16 @@ module.exports = {
|
||||
const mod = interaction.user
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
if (userid === "none") {
|
||||
await interaction.editReply({
|
||||
embeds: [{
|
||||
description: "You haven't specified a user to unban",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
const user = await interaction.client.users.fetch(userid)
|
||||
await interaction.guild.members.unban(user.id, reason)
|
||||
|
||||
|
||||
@@ -11,7 +11,13 @@ module.exports = {
|
||||
const focusedOption = interaction.options.getFocused(true)
|
||||
if (focusedOption.name !== "user") return
|
||||
|
||||
console.log
|
||||
if (focusedOption.value === "") {
|
||||
await interaction.respond([{
|
||||
name: "Please start typing a username to unban",
|
||||
value: "none"
|
||||
}])
|
||||
return
|
||||
}
|
||||
|
||||
const bannedUsers = await interaction.guild.bans.fetch()
|
||||
const filteredUsers = bannedUsers.filter((user) =>
|
||||
|
||||
Reference in New Issue
Block a user