Property 'getUser' does not exist on type 'Omit<CommandInteractionOptionResolver<CacheType>, "getMes

hey! I have error in TypeScript and Discord.js that says "Property 'getUser' does not exist on type 'Omit<CommandInteractionOptionResolver<CacheType>, "getMessage" | "getFocused">'", and it's working fine on another computer. It seems like the issue is not related to the version of Node.js, TypeScript, or Discord.js.
No description
6 Replies
d.js toolkit
d.js toolkit7mo 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! - Marked as resolved by OP
Byle.js
Byle.js7mo ago
yes
treble/luna
treble/luna7mo ago
and what is your ts version
Byle.js
Byle.js7mo ago
The interaction is fine, but the options only gives me get subcommands, groups and not getUser or channel. a minute 5.2.2
└─┬ discord.js@14.13.0
├─┬ @discordjs/builders@1.6.5
│ └── discord-api-types@0.37.50 deduped
├─┬ @discordjs/formatters@0.3.2
│ └── discord-api-types@0.37.50 deduped
├─┬ @discordjs/rest@2.0.1
│ └── discord-api-types@0.37.50 deduped
├─┬ @discordjs/ws@1.0.1
│ └── discord-api-types@0.37.50 deduped
└── discord-api-types@0.37.50
└─┬ discord.js@14.13.0
├─┬ @discordjs/builders@1.6.5
│ └── discord-api-types@0.37.50 deduped
├─┬ @discordjs/formatters@0.3.2
│ └── discord-api-types@0.37.50 deduped
├─┬ @discordjs/rest@2.0.1
│ └── discord-api-types@0.37.50 deduped
├─┬ @discordjs/ws@1.0.1
│ └── discord-api-types@0.37.50 deduped
└── discord-api-types@0.37.50
I didn't realize, I'll try to update
Byle.js
Byle.js7mo ago
No description
Byle.js
Byle.js7mo ago
new error XD That new error appears and the previous one continues loading
└─┬ discord.js@14.14.1
├─┬ @discordjs/builders@1.7.0
│ └── discord-api-types@0.37.61 deduped
├─┬ @discordjs/formatters@0.3.3
│ └── discord-api-types@0.37.61 deduped
├─┬ @discordjs/rest@2.2.0
│ └── discord-api-types@0.37.61 deduped
├─┬ @discordjs/ws@1.0.2
│ └── discord-api-types@0.37.61 deduped
└── discord-api-types@0.37.61
└─┬ discord.js@14.14.1
├─┬ @discordjs/builders@1.7.0
│ └── discord-api-types@0.37.61 deduped
├─┬ @discordjs/formatters@0.3.3
│ └── discord-api-types@0.37.61 deduped
├─┬ @discordjs/rest@2.2.0
│ └── discord-api-types@0.37.61 deduped
├─┬ @discordjs/ws@1.0.2
│ └── discord-api-types@0.37.61 deduped
└── discord-api-types@0.37.61
` yes A friend tried the same code on his PC and it worked It's my machine Ok
C:\nodejs64
├── corepack@0.17.1
└── npm@9.6.3
C:\nodejs64
├── corepack@0.17.1
└── npm@9.6.3
19.9 I have tried and it is not a question of versions, a friend tried with my code, same version of djs, node, tes And it worked for him
├── @types/common-tags@1.8.4
├── @types/moment@2.13.0
├── ascii-table3@0.9.0
├── chalk@5.3.0
├── common-tags@1.8.2
├── discord.js@14.14.1
├── dotenv@16.3.1
├── glob@10.3.10
├── moment@2.29.4
├── nodemon@3.0.1
└── typescript@5.2.2
├── @types/common-tags@1.8.4
├── @types/moment@2.13.0
├── ascii-table3@0.9.0
├── chalk@5.3.0
├── common-tags@1.8.2
├── discord.js@14.14.1
├── dotenv@16.3.1
├── glob@10.3.10
├── moment@2.29.4
├── nodemon@3.0.1
└── typescript@5.2.2
No show 4.7.3 My vscode is an old version Since my pc is w7 Well, as such the PC belongs to my sister and she doesn't want to update it to w10, there is no way for that version to use typescript 5.2.2? Oh I saw how Thank you, the problem is now solved 😊