Golang Telegram Bot Framework
Features:
- Multilingual
- MongoDB Database Storage
- Menu Based
- Super Easy to Develop
Installation
go get -u github.com/aliforever/gotelbot
go install
Usage
- Message BotFather and create a new bot.
- Copy the token.
- Run
gotelbot --init=token
(Replace token). - Run
go run main.go
. - Say Hello to your bot on Telegram.
Commands
-
gotelbot --init=token[,username] [--path=path/to/go/src] [--langs=english,etc]
example:- (if you don't pass ',username', gotelbot will grab the username) - (if you don't pass --path, gotelbot will use GOPATH environment variable) - (if you don't pass --langs, gotelbot will use English as default language)
gotelbot --init=bot123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
-
gotelbot --menu=name[:line] [--path=path/to/project]
example:- (if you don't pass ':line', gotelbot will append menu to end of application.go file) - (if you don't pass --path, gotelbot will read current terminal directory, where gotelbot command was executed. Make sure to cd bot's path.)
gotelbot --menu=Welcome
Flags
--langs=english,persian,italian
--path=/home/go/src/