Skip to content

PeterCxy/gotgbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gotgbot

Telegram bot example implementation in Golang

Build

go get github.com/PeterCxy/gotgbot/tgbot

Usage

tgbot /path/to/config.json

Config

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

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.

Testing

Put config file to test/test.json and then run make test

License

See the file LICENSE

About

Telegram Bot example implementation in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published