Updated formatting on modals and autocomplete
This commit is contained in:
@@ -9,21 +9,15 @@ export = {
|
||||
if (focusedOption.name !== "user") return
|
||||
|
||||
if (focusedOption.value === "") {
|
||||
await interaction.respond([
|
||||
{
|
||||
name: "Please start typing a username to unban",
|
||||
value: "none"
|
||||
}
|
||||
])
|
||||
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 =>
|
||||
user.user.username
|
||||
.toLowerCase()
|
||||
.includes(focusedOption.value.toLowerCase())
|
||||
)
|
||||
const filteredUsers = bannedUsers.filter(user => user.user.username.toLowerCase().includes(focusedOption.value.toLowerCase()))
|
||||
|
||||
const results = filteredUsers.map(user => ({
|
||||
name: user.user.username,
|
||||
|
||||
Reference in New Issue
Block a user