Patch webhook type, ActionRowBuilder issue
Hi,
I am using the Discord API to patch webhook message using he help of DiscordJS to create components. I'm trying to find and use the correct typescript type/interface for the JSON/Form params of my axios patch message.
I am trying with
RESTPatchAPIInteractionFollowupJSONBody
however when using the component param in the patch message, I get a ts error even though I am assigning the generic type to ActionRowBuilder:
The code:
The axios function:
Not sure where to go from here...4 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!
- ✅
Marked as resolved by OPTo clarify, the error is coming from
components: [row]
Can you try calling
.toJSON()
on row
? API objects are generally independent from builders, but that method converts the builders into API dataAh thats actually fixed it 👏👏👏👏
Legend, thank you v much