Is it possible to make a bot execute a curl command?
Am i able to make a bot reply to a command and execute a curl command (bash) at the same time?
8 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!discord.js 12
this is not djs related and v12 is unsupported and deprecated
Update to discord.js v13 or v14, and to execute curl, you can use child_process.spawn
or just v14
At least v13 is enough, but the way of creating the command is the same in all of them anyway, the only thing that changes is how it will respond, not process
i'm going to ask why OP uses child_process to send requests in javascript
why not use
fetch
or axios
Maybe for QUIC support? As Node.js doesn't support it?