Discord bot SKUs

Hello, i have two questions. Soi just added Monetization to my bot (SKUs) and i'm wondering if its possible to add like premium buttons and how? I successfully setuped premium command but i'm not sure how can i setup premium buttons. (If it is possible) Can someone please help? And second question. Is it somehow possible add a webhook so when a user buys a premium (for guild) ill get a notification using webhook. ill be happy with any answer! Thanks.
6 Replies
d.js toolkit
d.js toolkitā€¢4mo 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
DiortecxCZ
DiortecxCZā€¢4mo ago
Well if you can help me. Ill need help with both :d Well, i have no idea how to send a webhook when someone buys a premium. Idk where to actually start with the code Im new to discord monetization šŸ˜„ No, im not new to discord.js at all. But im not exactly sure how the webhook s work.
d.js docs
d.js docsā€¢4mo ago
:method: TextChannel#createWebhook() Creates a webhook for the channel.
DiortecxCZ
DiortecxCZā€¢4mo ago
Okay but
d.js docs
d.js docsā€¢4mo ago
:method: Webhook#send() Sends a message with this webhook.
DiortecxCZ
DiortecxCZā€¢4mo ago
How can i make an event when someone buys a premium? I mean bot monetization premium I didnt find an event for that in d.js docs Oh ye, i understand how that part works. Hm So If i update djs to the latest verison I should be able to use it? hm, so npm i discord.js@?? hm alr Alr Thanks a lot for you help and what about the button interaction. How can i check if the user has a premium or not? oh so if (interaction.user hmmm Alright, Ill try Thank you so much for help Can you just wait one minute so i can screenshot this whole chat so i can get back to it when i have time? ye ik i just nevermind... But i really appreciate your help, thank you!