Argument of type 'ButtonStyle.Link' is not assignable to parameter of type 'ButtonStyle'

Argument of type 'ButtonStyle.Link' is not assignable to parameter of type 'ButtonStyle'.ts(2345)
Argument of type 'ButtonStyle.Link' is not assignable to parameter of type 'ButtonStyle'.ts(2345)
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
d.js toolkit
d.js toolkit6mo 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!
Youssef
YoussefOP6mo ago
Node: 18.16.1
Youssef
YoussefOP6mo ago
Code
No description
and
and6mo ago
make sure to only use discord.js and use everything from there Using different packages for the bot always causes issues for me
Youssef
YoussefOP6mo ago
euh now, im not using discord.js for my bot
and
and6mo ago
ohh I'm afraid I can't help you then
Amgelo
Amgelo6mo ago
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
Youssef
YoussefOP6mo ago
Switched to that but still has the problem alright thanks ...
duck
duck6mo ago
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 version
Youssef
YoussefOP6mo ago
this worked thanks although if you're familiar with the InteractionOptionResolver from @sapphire/discord-utilities
Youssef
YoussefOP6mo ago
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
No description
Youssef
YoussefOP6mo ago
No description
Youssef
YoussefOP6mo ago
let me try edited: both
Youssef
YoussefOP6mo ago
No description
NyR
NyR5mo ago
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 release
d.js docs
d.js docs5mo ago
:dtypes: v10: isMessageComponentButtonInteraction read more
Youssef
YoussefOP5mo ago
for this
vladdy
vladdy5mo ago
its already installed by other deps, just import it from there
jakub
jakub5mo ago
Phatom deoendencies 💀
Unknown User
Unknown User5mo ago
Message Not Public
Sign In & Join Server To View
jakub
jakub5mo ago
Fine, I have no power here anyway
Want results from more Discord servers?
Add your server