mirror of
https://github.com/utmapp/BluBot.git
synced 2026-12-01 14:00:15 -10:00
12 lines
450 B
JavaScript
12 lines
450 B
JavaScript
const tag = require('../utils/tag')
|
|
|
|
module.exports = {
|
|
id: 'tag',
|
|
async execute(interaction) {
|
|
if (!['remove', 'get', 'edit', 'faqtoggle'].includes(interaction.options.getSubcommand())) return
|
|
const tags = tag.getAll()
|
|
const tagNames = Object.keys(tags).filter(name => name.toLowerCase().includes(interaction.options.getFocused().toLowerCase()))
|
|
return interaction.respond(tagNames.map(tag => ({ name: tag, value: tag })))
|
|
}
|
|
}
|