2022-03-24 11:47:37 +00:00
|
|
|
package modules
|
|
|
|
|
2022-03-25 19:06:13 +00:00
|
|
|
import (
|
2022-03-27 01:21:07 +00:00
|
|
|
"git.fromouter.space/crunchy-rocks/emoji"
|
2022-03-25 19:06:13 +00:00
|
|
|
"git.fromouter.space/hamcha/tg"
|
|
|
|
"github.com/cockroachdb/pebble"
|
|
|
|
)
|
|
|
|
|
|
|
|
type ModuleOptions struct {
|
2022-03-27 01:21:07 +00:00
|
|
|
API *tg.Telegram
|
|
|
|
Name string
|
|
|
|
KV *pebble.DB
|
|
|
|
Emojis emoji.Table
|
2022-03-25 19:06:13 +00:00
|
|
|
}
|
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)
|
|
|
|
}
|