A simple Telegram Bot to run shell commands remotely, so that you can maintain your server from mobile phones!
- 下载本项目
- 修改config.js
- 获取USER_ID
- 创建一个机器人 Telegram instructions
docker build -t tgbot .
- 启动容器:
- 三个代理地址可以不填写,只要保证自己的网络环境畅通
docker run -d \
--restart=always \
--privileged \
--network=host \
--name tgbot \
-e http_proxy=0.0.0.0:2017 \
-e https_proxy=0.0.0.0:2017 \
-e TDL_PROXY=0.0.0.0:2017 \
-v /宿主机/.tdl:/root/.tdl \
-v /宿主机/downloads:/downloads \
tgbot
Download or clone this repo, then
npm install
- Follow Telegram instructions to create a bot, and you will get bot token.
- Find you user ID
- Then put your telegram user ID and bot token in
config.js
:
module.exports = {
config:function(){
return (
{
adminUsers:[USER_ID], //admin users' telegram id, should be numbers
botToken: 'YOUR_BOT_TOEKN', // bot token
}
);
}
};
npm run start
or
node index.js
That is it!