gotgbot

module
v0.0.0-...-036093c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2016 License: GPL-3.0

README

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

Directories

Path Synopsis
Bar/QRcode reader / gendrator Barcode decoder
Bar/QRcode reader / gendrator Barcode decoder
common
Shared code between blackguns
Shared code between blackguns
rich
Are you rich?
Are you rich?
channels
Chinese language model
Chinese language model
Misc features Parse printf format string tokens
Misc features Parse printf format string tokens
Picture source: gank.io Pictures fetcher
Picture source: gank.io Pictures fetcher
Google search functions scholar bot
Google search functions scholar bot
Scripting support
Scripting support
support

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL