mirror of
https://shylinux.com/x/icebergs
synced 2025-05-03 03:57:01 +08:00
add some
This commit is contained in:
parent
f3612ef710
commit
bbb4994422
@ -128,7 +128,11 @@ func Toast(m *ice.Message, text string, arg ...ice.Any) *ice.Message { // [title
|
||||
var Icons = map[string]string{ice.PROCESS: "🕑", ice.FAILURE: "❌", ice.SUCCESS: "✅"}
|
||||
|
||||
func toastContent(m *ice.Message, state string, arg ...ice.Any) string {
|
||||
return kit.JoinWord(kit.Simple(Icons[state], m.ActionKey(), state, arg)...)
|
||||
if len(arg) == 0 {
|
||||
return kit.JoinWord(kit.Simple(Icons[state], m.ActionKey(), state)...)
|
||||
} else {
|
||||
return kit.JoinWord(kit.Simple(Icons[state], arg)...)
|
||||
}
|
||||
}
|
||||
func ToastSuccess(m *ice.Message, arg ...ice.Any) {
|
||||
Toast(m, toastContent(m, ice.SUCCESS, arg...), "", "1s")
|
||||
|
@ -82,6 +82,9 @@ func init() {
|
||||
ctx.OptionFromConfig(m, MENUS)
|
||||
_action_list(m, arg[0], arg[1])
|
||||
} else {
|
||||
if arg[2] == "web.chat.island.portal" {
|
||||
m.Option(ice.MSG_USERROLE, aaa.VOID)
|
||||
}
|
||||
_action_exec(m, arg[0], arg[1], arg[2], arg[3:]...)
|
||||
}
|
||||
}},
|
||||
|
Loading…
x
Reference in New Issue
Block a user