1
0
forked from x/icebergs
icebergs/core/chat/search.go
2020-06-22 08:53:45 +08:00

21 lines
430 B
Go

package chat
import (
"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 len(arg) > 2 {
m.Cmdy(mdb.RENDER, arg)
return
}
m.Cmdy(mdb.SEARCH, arg)
}},
},
}, nil)
}