Argument of type 'ButtonStyle.Link' is not assignable to parameter of type 'ButtonStyle'
Im using
@discord.js/core
with @discordjs/builders
for the ButtonBuilder
and discord-api-types/v10
for the ButtonStyle
Versions:
discord-api-types: "^0.37.92"
@discordjs/core: "^1.2.0",
@discordjs/builders: "^1.8.2",
22 Replies
- 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!Node: 18.16.1
Code
make sure to only use
discord.js
and use everything from there
Using different packages for the bot always causes issues for meeuh now, im not using discord.js for my bot
ohh I'm afraid I can't help you then
https://github.com/discordjs/discord.js/blob/main/packages/builders/package.json#L71 seems like builders is pinned to discord-api-types 0.37.90, you could try using that
ts enums are confusing
btw you should use node 20 which is latest lts, it's probably not related to your issue but a general recommendation
Switched to that but still has the problem
alright thanks
...
this was bumped after the latest stable release of /builders
/[email protected] uses
0.37.83
, same as latest stable of /core
even if you're not using discord.js
, I'd still recommend not installing discord-api-types
separately and just using whatever comes with /core (which does also reexport some things such as enums)
I can only reproduce this with a mismatched discord-api-types
versionthis worked thanks
although if you're familiar with the
InteractionOptionResolver
from @sapphire/discord-utilities
when i do this and it's imported from the core package it throws an error but when imported from discord-api-types it doesnt
let me try
edited: both
I am facing the same issue, looks like sapphire is using the latest
discord-api-types
, while core
isn't, for now I'm ignoring the error until core bumps the version in the next releaseOkay removed it
but i need it tho; https://discord.com/channels/222078108977594368/1251618219102437499/1251637570295566456
for this
its already installed by other deps, just import it from there
Phatom deoendencies 💀
Unknown User•4mo ago
Message Not Public
Sign In & Join Server To View
Fine, I have no power here anyway