clessy-ng/modules/module.go

18 lines
266 B
Go
Raw Normal View History

2022-03-24 11:47:37 +00:00
package modules
2022-03-25 19:06:13 +00:00
import (
"git.fromouter.space/hamcha/tg"
"github.com/cockroachdb/pebble"
)
type ModuleOptions struct {
API *tg.Telegram
Name string
KV *pebble.DB
}
2022-03-24 11:47:37 +00:00
type Module interface {
2022-03-25 19:06:13 +00:00
Initialize(options ModuleOptions) error
2022-03-24 11:47:37 +00:00
OnUpdate(tg.APIUpdate)
}