Skip to content

Commit

Permalink
Ignore case for tag suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
BluDood committed Nov 5, 2022
1 parent 9cb35f3 commit 99d0a59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autocomplete/tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
async execute(interaction) {
if (!['remove', 'get', 'edit'].includes(interaction.options.getSubcommand())) return
const tags = tag.getAll()
const tagNames = Object.keys(tags).filter(name => name.includes(interaction.options.getFocused()))
const tagNames = Object.keys(tags).filter(name => name.toLowerCase().includes(interaction.options.getFocused().toLowerCase()))
return interaction.respond(tagNames.map(tag => ({ name: tag, value: tag })))
}
}

0 comments on commit 99d0a59

Please sign in to comment.