mirror of
https://github.com/fumiama/NanoBot.git
synced 2026-06-09 12:40:24 +08:00
feat: add MessageDelete log
This commit is contained in:
1
event.go
1
event.go
@@ -96,6 +96,7 @@ func (bot *Bot) processEvent(payload *WebsocketPayload) {
|
|||||||
User: ctx.Message.Author,
|
User: ctx.Message.Author,
|
||||||
}
|
}
|
||||||
ctx.Message.Author = opmember.User
|
ctx.Message.Author = opmember.User
|
||||||
|
log.Infoln(getLogHeader(), "x>", mdl)
|
||||||
}
|
}
|
||||||
go match(ctx, matchers)
|
go match(ctx, matchers)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,6 +170,15 @@ type MessageDelete struct {
|
|||||||
OpUser *User `json:"op_user"`
|
OpUser *User `json:"op_user"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (mdl *MessageDelete) String() string {
|
||||||
|
sb := strings.Builder{}
|
||||||
|
sb.WriteString("用户: ")
|
||||||
|
sb.WriteString(mdl.OpUser.ID)
|
||||||
|
sb.WriteString("删除了消息: ")
|
||||||
|
sb.WriteString(mdl.Message.String())
|
||||||
|
return sb.String()
|
||||||
|
}
|
||||||
|
|
||||||
// MessageAudited 消息审核对象
|
// MessageAudited 消息审核对象
|
||||||
//
|
//
|
||||||
// https://bot.q.qq.com/wiki/develop/api/openapi/message/model.html#%E6%B6%88%E6%81%AF%E5%AE%A1%E6%A0%B8%E5%AF%B9%E8%B1%A1-messageaudited
|
// https://bot.q.qq.com/wiki/develop/api/openapi/message/model.html#%E6%B6%88%E6%81%AF%E5%AE%A1%E6%A0%B8%E5%AF%B9%E8%B1%A1-messageaudited
|
||||||
|
|||||||
Reference in New Issue
Block a user