1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-27 01:48:27 +08:00
icebergs/core/chat/search.go
2023-09-10 11:27:06 +08:00

22 lines
579 B
Go

package chat
import (
ice "shylinux.com/x/icebergs"
"shylinux.com/x/icebergs/base/cli"
"shylinux.com/x/icebergs/base/ctx"
"shylinux.com/x/icebergs/base/web"
)
const SEARCH = "search"
func init() {
Index.MergeCommands(ice.Commands{
SEARCH: {Name: "search", Help: "搜索框", Actions: ice.MergeActions(ice.Actions{
cli.OPENS: {Hand: func(m *ice.Message, arg ...string) { cli.Opens(m, arg...) }},
"/": {Hand: func(m *ice.Message, arg ...string) {
m.Cmdy(web.Space(m, m.Option(ice.POD)), "mdb.search", arg).StatusTimeCount()
}},
}, ctx.CmdAction())},
})
}