Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Nov 16, 2023
1 parent e16f112 commit 49b7293
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 11 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/FloatTech/zbpctrl v1.6.0
github.com/FloatTech/zbputils v1.7.1-0.20231017135158-7e6c839764eb
github.com/disintegration/imaging v1.6.2
github.com/fumiama/NanoBot v0.0.0-20231115163434-737c05f1c1f0
github.com/fumiama/NanoBot v0.0.0-20231116150429-c9ba2f735069
github.com/fumiama/go-base16384 v1.7.0
github.com/fumiama/go-registry v0.2.6
github.com/fumiama/unibase2n v0.0.0-20221020155353-02876e777430
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ github.com/ericpauley/go-quantize v0.0.0-20200331213906-ae555eb2afa4 h1:BBade+Jl
github.com/ericpauley/go-quantize v0.0.0-20200331213906-ae555eb2afa4/go.mod h1:H7chHJglrhPPzetLdzBleF8d22WYOv7UM/lEKYiwlKM=
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 h1:Yzb9+7DPaBjB8zlTR87/ElzFsnQfuHnVUVqpZZIcV5Y=
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0=
github.com/fumiama/NanoBot v0.0.0-20231115163434-737c05f1c1f0 h1:mQxEX2NqGdyiK5qfY9EjTnSPGHL3oDLHmdzW5CpjxKo=
github.com/fumiama/NanoBot v0.0.0-20231115163434-737c05f1c1f0/go.mod h1:kpkfUjFBbYdjiYyaNMZjSM3i4Gy4BTlbSSocRIoSSXQ=
github.com/fumiama/NanoBot v0.0.0-20231116150429-c9ba2f735069 h1:uwCFQhF24TEYh3h3rWc++vZBAYbl9+hwJ/Q6MOYXbdQ=
github.com/fumiama/NanoBot v0.0.0-20231116150429-c9ba2f735069/go.mod h1:kpkfUjFBbYdjiYyaNMZjSM3i4Gy4BTlbSSocRIoSSXQ=
github.com/fumiama/bigfft v0.0.0-20211011143303-6e0bfa3c836b h1:Zt3pFQditAdWTHCOVkiloc9ZauBoWrb37guFV4iIRvE=
github.com/fumiama/bigfft v0.0.0-20211011143303-6e0bfa3c836b/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/fumiama/cron v1.3.0 h1:ZWlwuexF+HQHl3cYytEE5HNwD99q+3vNZF1GrEiXCFo=
Expand Down
32 changes: 24 additions & 8 deletions plugin/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package manager

import (
"strconv"
"strings"

nano "github.com/fumiama/NanoBot"
Expand All @@ -17,15 +18,30 @@ func init() {
})
en.OnMessageCommand("exposeid").SetBlock(true).
Handle(func(ctx *nano.Ctx) {
msg := "*报告*\n- 频道ID: `" + ctx.Message.ChannelID + "`"
for _, e := range strings.Split(ctx.State["args"].(string), " ") {
e = strings.TrimSpace(e)
if e == "" {
continue
msg := ""
if nano.OnlyQQ(ctx) {
msg = "*报告*\n- 群ID: `" + strconv.FormatInt(int64(ctx.GroupID()), 10) + "`"
for _, e := range strings.Split(ctx.State["args"].(string), " ") {
e = strings.TrimSpace(e)
if e == "" {
continue
}
if strings.HasPrefix(e, "<@!") {
uid := strings.TrimSuffix(e[3:], ">")
msg += "\n- 用户: " + e + " ID: `" + uid + "`"
}
}
if strings.HasPrefix(e, "<@!") {
uid := strings.TrimSuffix(e[3:], ">")
msg += "\n- 用户: " + e + " ID: `" + uid + "`"
} else {
msg = "*报告*\n- 频道ID: `" + ctx.Message.ChannelID + "`"
for _, e := range strings.Split(ctx.State["args"].(string), " ") {
e = strings.TrimSpace(e)
if e == "" {
continue
}
if strings.HasPrefix(e, "<@!") {
uid := strings.TrimSuffix(e[3:], ">")
msg += "\n- 用户: " + e + " ID: `" + uid + "`"
}
}
}
_, _ = ctx.SendPlainMessage(true, msg)
Expand Down

0 comments on commit 49b7293

Please sign in to comment.