Skip to content

mtgo-labs/plugins-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mtgo plugin: YOUR_PLUGIN_NAME

Short description of what this plugin does.

Install

go get github.com/mtgo-labs/plugins/YOUR_PLUGIN_NAME

Getting Started

  1. Copy this template to plugins/your_plugin_name/
  2. Replace YOUR_PLUGIN_NAME in go.mod, plugin.go, plugin_test.go, and README.md with your plugin name (lowercase, no hyphens/underscores)
  3. Update go.mod module path to github.com/mtgo-labs/plugins/your_plugin_name
  4. Implement the Plugin interface: Name(), Start(), Stop()

Usage

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()
}

Configuration

Field Type Description

License

MIT

About

Template repository for mtgo plugins

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages