Jannek
Jannek
DIAdiscord.js - Imagine an app
Created by Jannek on 4/10/2024 in #djs-questions
multiple autocomplete
hi, i have a subcommand like this and an autocomplete function that gets the interaction, how can i "see" what option it should autocomplete? i tried
interaction.options.getString('name')
interaction.options.getString('name')
because that was somewhere in the internet, but that just gives null
..addSubcommand(subcommand =>
subcommand
.setName('cwl-log')
.setDescription('view the clans specific CWL log')
.addStringOption(option =>
option.setName('season')
.setDescription('CWL season by month and year')
.setAutocomplete(true)
.setRequired(true))
.addStringOption(option =>
option.setName('day')
.setDescription('warday of the cwl')
.setAutocomplete(true)))
..addSubcommand(subcommand =>
subcommand
.setName('cwl-log')
.setDescription('view the clans specific CWL log')
.addStringOption(option =>
option.setName('season')
.setDescription('CWL season by month and year')
.setAutocomplete(true)
.setRequired(true))
.addStringOption(option =>
option.setName('day')
.setDescription('warday of the cwl')
.setAutocomplete(true)))
5 replies