Updated unban command

This commit is contained in:
2023-12-04 11:22:57 +01:00
parent dff052be40
commit e0cf09c936
2 changed files with 17 additions and 1 deletions

View File

@@ -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) =>