1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-27 01:48:27 +08:00
icebergs/core/chat/search.go
2020-07-01 20:39:39 +08:00

21 lines
495 B
Go

package chat
import (
ice "github.com/shylinux/icebergs"
"github.com/shylinux/icebergs/base/mdb"
)
func init() {
Index.Merge(&ice.Context{
Commands: map[string]*ice.Command{
"/" + mdb.SEARCH: {Name: "/search", Help: "搜索引擎", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
if m.Option("cmd") == "" {
m.Cmdy(m.Space(m.Option("pod")), mdb.SEARCH, arg)
return
}
m.Cmdy(m.Space(m.Option("pod")), mdb.RENDER, arg)
}},
},
}, nil)
}