Answer the question
In order to leave comments, you need to log in
How to run bash command from js telegram bot?
The bot is on a Linux(CentOS) server. By pressing a button in the tg-bot (on js), a command is launched in this Linux server, for example wget 'url to some image to download to the server'. What library to implement?
I know that in python there is a subprocess library.
Answer the question
In order to leave comments, you need to log in
1. Why use wget if you can download the file using js?
2. https://nodejs.org/api/child_process.html
const { spawn } = require('child_process');
spawn("wget", []); // в массив пихаешь все параметры.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question