refactor: 校长上下文调整为群共用

This commit is contained in:
lixiangwuxian 2024-10-25 01:36:42 +08:00
parent 28dec155f8
commit 2834f73d06

View File

@ -24,7 +24,7 @@ func init() {
} }
func headmasterHandler(msg model.Message) (reply model.Reply) { func headmasterHandler(msg model.Message) (reply model.Reply) {
from := util.From(msg.GroupInfo.GroupId, msg.UserId) from := util.From(msg.GroupInfo.GroupId, 0)
if len(msg.RawMsg) > 7 && msg.RawMsg[0:7] == "校长 " { if len(msg.RawMsg) > 7 && msg.RawMsg[0:7] == "校长 " {
return model.Reply{ return model.Reply{
ReplyMsg: ask(from, msg.RawMsg[7:]), ReplyMsg: ask(from, msg.RawMsg[7:]),