Discord-user-bots
Discord-user-bots copied to clipboard
how to use slash commands? client.send() only send text as text but not as a command
Slash commands do not work as of version 1.6.0.
I managed to send the slash commands through the client.fetch_request(), if I understand it right, all the slash commands 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 example:
const answer = await client.fetch_request( 'interactions', { method: 'POST', body: {<THE BODY OF THE REQUEST FROM WEB DISCORD>} }