Open Rider21 opened 2 years ago
Buttons are only possible for normal bots, not users.
I mean by pressing a button rather than sending it in a message
Seconded. I'd like to run e2e automated tests against a discord bot of mine, but part of what I have to test is interactions in a dm channel. Using a automated userbot to test to bot seems the only way to approach true e2e automated tests. It seems the only thing in the way of using this library for the purpose I want is support for interactions.
I will look into it.
any update on this?
I managed to push the buttons as well as send the slash commands through the client.fetch_request()
, if I understand it right, all the slash commands and buttons are interactions, so you need to go to the web version of Discord, open the network and send the slash command and you should see the post request that is sended to 'interactions' url and with that you can do client.fetch_request()
. For buttons you need to get the message from bot through the client.on.message_create()
and there you need to look at the components of this message, this components will be the buttons id. Next, you need to go to the browser again and click on some button and in the network tab you again will see the 'interactions' request. All you need to do is to send it like it was with the slash command through the client.fetch_request()
For example:
`const answer = await client.fetch_request(
'interactions',
{
method: 'POST',
body: {
I noticed that there is no support for button interactions![изображение](https://user-images.githubusercontent.com/58046032/167445561-60bc3cd6-ecec-4568-92ac-7e54e5763766.png)