Answer the question
In order to leave comments, you need to log in
How to click a button in a Discord message (selfbot)?
Hello, I recently had a desire to understand the new version of the Discord API. With the new version, many changes have come to this platform, such as buttons. I would like to figure out how to use a button click through a selfbot. Such an operation is hardly presented to bots, so we can forget about the official library.
I am currently using the discord.js-selfbot (v12) library.
I began to think how I could do the operation I needed, as a result, there is only one way (or not?). I would like to send a content request from my account in order for it to click on a button.
I looked at what parameters are needed in the request.
The path where the request itself is sent: https://discord.com/api/v9/interactions
After many attempts to make any progress, I began to think that they were definitely doing something wrong.
I have a couple of questions, is it possible to get cookies after logging in a selfie in discord, is there any library for such things, or is there a path to cookies in the discord library itself?
How to get the rest of the data? nonce , session_id , etc.
The code itself may be of interest to someone.
{
method: "POST",
headers: {
"Content-Type": "application/json; charset=UTF-8",
"Authorization": token,
"Cookie": "..."
},
body: {
"application_id": "id",
"channel_id": "id",
"data": {
"component_type": 2,
"custom_id": "244d190a-5b3...",
},
"guild_id": "id",
"message_flags": 0,
"message_id": "id",
"nonce": "цифарки",
"session_id": "id",
"type": 3,
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question