mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 01:24:05 +08:00
23 lines
521 B
Go
23 lines
521 B
Go
package lark
|
|
|
|
import (
|
|
ice "shylinux.com/x/icebergs"
|
|
"shylinux.com/x/icebergs/base/web"
|
|
"shylinux.com/x/icebergs/core/chat"
|
|
)
|
|
|
|
const LARK = "lark"
|
|
|
|
var Index = &ice.Context{Name: LARK, Help: "机器人",
|
|
Commands: map[string]*ice.Command{
|
|
ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
|
m.Load()
|
|
}},
|
|
ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
|
m.Save()
|
|
}},
|
|
},
|
|
}
|
|
|
|
func init() { chat.Index.Register(Index, &web.Frame{}) }
|