CommandInteractionOptionResolver broke since updating to v.14.12.1

Hey, did they change something to the OptionResolver? I looked at the changelog but can't seem to find anything.. however since I updated fetching the command options no longer works
2 Replies
d.js toolkit
d.js toolkit2y ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
darby
darbyOP2y ago
Code for resolving options (worked perfectly fine yesterday)
let commandOption: Steam.Profile | string =
commandGroup === 'profiles'
? (interaction.options.getString('profile') as string)
: (interaction.options.getUser('user')?.id as string);
let commandOption: Steam.Profile | string =
commandGroup === 'profiles'
? (interaction.options.getString('profile') as string)
: (interaction.options.getUser('user')?.id as string);
This worked fine yesterday.. however when I start the bot it crashes now before even being able to execute the command
src/commands/test.command.ts:35:32 - error TS2339: Property 'getString' does not exist on type 'Omit<CommandInteractionOptionResolver<CacheType>, "getMessage" | "getFocused">'.

35 ? (interaction.options.getString('profile') as string)
~~~~~~~~~
src/commands/test.command.ts:36:32 - error TS2339: Property 'getUser' does not exist on type 'Omit<CommandInteractionOptionResolver<CacheType>, "getMessage" | "getFocused">'.

36 : (interaction.options.getUser('user')?.id as string);
src/commands/test.command.ts:35:32 - error TS2339: Property 'getString' does not exist on type 'Omit<CommandInteractionOptionResolver<CacheType>, "getMessage" | "getFocused">'.

35 ? (interaction.options.getString('profile') as string)
~~~~~~~~~
src/commands/test.command.ts:36:32 - error TS2339: Property 'getUser' does not exist on type 'Omit<CommandInteractionOptionResolver<CacheType>, "getMessage" | "getFocused">'.

36 : (interaction.options.getUser('user')?.id as string);
Want results from more Discord servers?
Add your server