Short description of what this plugin does.
go get github.com/mtgo-labs/plugins/YOUR_PLUGIN_NAME- Copy this template to
plugins/your_plugin_name/ - Replace
YOUR_PLUGIN_NAMEingo.mod,plugin.go,plugin_test.go, andREADME.mdwith your plugin name (lowercase, no hyphens/underscores) - Update
go.modmodule path togithub.com/mtgo-labs/plugins/your_plugin_name - Implement the
Plugininterface:Name(),Start(),Stop()
import (
tg "github.com/mtgo-labs/mtgo/telegram"
yourplugin "github.com/mtgo-labs/plugins/YOUR_PLUGIN_NAME"
)
func main() {
client, _ := tg.NewClient(apiID, apiHash, &tg.Config{
BotToken: botToken,
})
client.Use(yourplugin.New(yourplugin.Config{}))
// your handlers...
client.Start()
}| Field | Type | Description |
|---|---|---|
MIT