Autocomplete Command not sending update

Not too sure how to explain it exactly however,

I have a command with multiple Autocomplete options, therefore I have added in a "key" option so they can select what specific key they are wanting.
/config reset key:string value:AutocompleteString

Here is an extract from my code(the portion responsible for AutocompleteInteractions for this specific command):
async ({ interaction, client }) => {
    if (!interaction.guild) return;
    const focusedValue = interaction.options.getFocused();

    const group = interaction.options.getSubcommandGroup(true);
    const command = interaction.options.getSubcommand(true);

    const guild_config = await getGuildConfig(interaction.guild.id)
    
    if (group == 'reset' && command == 'one') {
        const key = interaction.options.getString('key', true);
        let _options: string[] = [];

        switch (key) {
            case 'disabled-buttons': _options = guild_config.disabled_buttons; break;
            case 'color': _options = guild_config.custom_colours.map(x => x.name); break;
            case 'restricted-channels':
                let _chans: string[] = [];
                for (const channel of guild_config.restricted_channels) {
                    try {
                        const _chan = await client.channels.fetch(channel) as TextChannel;
                        _chans.push(_chan.name);
                    } catch (error) { }
                }
                _options = _chans;
                break;
            }



Here is a gif demonstrating what I am meaning:
https://i.imgur.com/bu90n92.gif

Versions:
Node.js@v16.10.0
Discord.js@v14.11.0
Imgur
Was this page helpful?