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 toolkit•10mo 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
Sxm•10mo ago
discord.js 12
treble/luna
treble/luna•10mo ago
this is not djs related and v12 is unsupported and deprecated
ThePedroo
ThePedroo•10mo ago
Update to discord.js v13 or v14, and to execute curl, you can use child_process.spawn
treble/luna
treble/luna•10mo ago
or just v14
ThePedroo
ThePedroo•10mo 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
darp•10mo ago
i'm going to ask why OP uses child_process to send requests in javascript why not use fetch or axios
ThePedroo
ThePedroo•10mo ago
Maybe for QUIC support? As Node.js doesn't support it?
Want results from more Discord servers?
Add your server