mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
✏️ fix gist panic
This commit is contained in:
parent
45448e6f53
commit
7eaac7a20b
@ -505,6 +505,10 @@ func init() { // 插件主体
|
|||||||
// gist 内容是当前 uinx 时间戳,在 10 分钟内视为有效
|
// gist 内容是当前 uinx 时间戳,在 10 分钟内视为有效
|
||||||
ans := ctx.Event.Comment[strings.Index(ctx.Event.Comment, "答案:")+len("答案:"):]
|
ans := ctx.Event.Comment[strings.Index(ctx.Event.Comment, "答案:")+len("答案:"):]
|
||||||
divi := strings.Index(ans, "/")
|
divi := strings.Index(ans, "/")
|
||||||
|
if divi <= 0 {
|
||||||
|
ctx.SetGroupAddRequest(ctx.Event.Flag, "add", false, "格式错误!")
|
||||||
|
return
|
||||||
|
}
|
||||||
ghun := ans[:divi]
|
ghun := ans[:divi]
|
||||||
hash := ans[divi+1:]
|
hash := ans[divi+1:]
|
||||||
logrus.Infoln("[manager]收到加群申请, 用户:", ghun, ", hash:", hash)
|
logrus.Infoln("[manager]收到加群申请, 用户:", ghun, ", hash:", hash)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user