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
d.js toolkit
d.js toolkit6mo 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!
Sxm
Sxm6mo ago
discord.js 12
treble/luna
treble/luna6mo ago
this is not djs related and v12 is unsupported and deprecated
ThePedroo
ThePedroo6mo ago
Update to discord.js v13 or v14, and to execute curl, you can use child_process.spawn
treble/luna
treble/luna6mo ago
or just v14
ThePedroo
ThePedroo6mo ago
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
darp
darp6mo ago
i'm going to ask why OP uses child_process to send requests in javascript why not use fetch or axios
ThePedroo
ThePedroo6mo ago
Maybe for QUIC support? As Node.js doesn't support it?