node远程执行shell命令
TeleShellBot
教程
Github地址:https://github.com/marknote/TeleShellBot
1、安装
git clone https://github.com/marknote/TeleShellBot.git
cd TeleShellBot
npm installgit和npm安装请参考:Debian/Ubuntu/CentOS安装最新版的Node.js和NPM教程,Debian/Ubuntu/CentOS安装Git教程。
2、配置
根据Telegram instructions去创建一个机器人的UserID,然后将UserID和BOT token放到config.js里面。
module.exports = {
config:function(){
return (
{
adminUsers:[ADMIN_ID], //admin users' telegram id, should be numbers
botToken: 'YOUR_BOT_TOEKN', // bot token
}
);
}
};3、运行
npm startor
node index.jsLast updated