Telegram - Server Bridge for up-down files, exec commands easily
-
Open @botfather on Telegram > Create bot, take note for bot token
-
Send message any json bot on Telegram for find user id (Example @JsonDumpBot) > take note for from-id
export token="<yourBotToken>" export adminid="<yourUserID>"
Run
./bot
With screen: (ctrl + a + d on background )
screen -S myBot ./bot
/help > Show help message
/ls > list dir
/pwd > where am i
/cd > change dir
/exec ... > exec command | realtime |
<anyText> if text avaible and file; upload for user || if text avaible and dir; cd dir else show error
<anyDoc> upload for server
git clone https://github.com/raifpy/tgServerBridge
cd tgServerBridge
go get -u gopkg.in/tucnak/telebot.v2
go build -ldflags="-w -s" .