Telegram bot example implementation in Golang
go get github.com/PeterCxy/gotgbot/tgbot
tgbot /path/to/config.json
Basic config
{
"key": "api_key",
"name": "bot_name",
"debug": true/false,
"modules": [
"module1": true/false,
"module2": true/false,
...
],
}
To make the bot work, you will need extra configurations for modules.
Modules are defined in every sub-package in this repo. To add new modules, make a new package and register it in support/loader/loader.go
Some modules may need specific configuration in the config file to work. See the module sources for details.
A module can be disabled by setting it to false
in config.
Put config file to test/test.json
and then run make test
See the file LICENSE