diff --git a/plugin_wtf/main.go b/plugin_wtf/main.go index ae64e9e9..0855895b 100644 --- a/plugin_wtf/main.go +++ b/plugin_wtf/main.go @@ -45,11 +45,11 @@ func init() { return } // 获取名字 - name := ctx.State["args"].(string) + var name string if len(ctx.Event.Message) > 1 && ctx.Event.Message[1].Type == "at" { qq, _ := strconv.ParseInt(ctx.Event.Message[1].Data["qq"], 10, 64) name = ctx.GetGroupMemberInfo(ctx.Event.GroupID, qq, false).Get("nickname").Str - } else if name == "" { + } else { name = ctx.Event.Sender.NickName } text, err := w.Predict(name)