mirror of
https://github.com/fumiama/NanoBot.git
synced 2026-06-11 21:50:29 +08:00
feat: add MessageDelete log
This commit is contained in:
@@ -42,9 +42,11 @@ type Message struct {
|
|||||||
// "=> ギルド:", ctx.Message.GuildID+", 频道:", ctx.Message.ChannelID+", 用户:", ctx.Message.Author.Username+"("+ctx.Message.Author.ID+"), 内容:", ctx.Message.Content
|
// "=> ギルド:", ctx.Message.GuildID+", 频道:", ctx.Message.ChannelID+", 用户:", ctx.Message.Author.Username+"("+ctx.Message.Author.ID+"), 内容:", ctx.Message.Content
|
||||||
func (m *Message) String() string {
|
func (m *Message) String() string {
|
||||||
sb := strings.Builder{}
|
sb := strings.Builder{}
|
||||||
sb.WriteByte('[')
|
if m.SeqInChannel != "" {
|
||||||
sb.WriteString(m.SeqInChannel)
|
sb.WriteByte('[')
|
||||||
sb.WriteByte(']')
|
sb.WriteString(m.SeqInChannel)
|
||||||
|
sb.WriteByte(']')
|
||||||
|
}
|
||||||
sb.WriteString(m.ID)
|
sb.WriteString(m.ID)
|
||||||
sb.WriteString(" ギルド: ")
|
sb.WriteString(" ギルド: ")
|
||||||
sb.WriteString(m.GuildID)
|
sb.WriteString(m.GuildID)
|
||||||
@@ -172,9 +174,9 @@ type MessageDelete struct {
|
|||||||
|
|
||||||
func (mdl *MessageDelete) String() string {
|
func (mdl *MessageDelete) String() string {
|
||||||
sb := strings.Builder{}
|
sb := strings.Builder{}
|
||||||
sb.WriteString("用户: ")
|
sb.WriteString("用户ID ")
|
||||||
sb.WriteString(mdl.OpUser.ID)
|
sb.WriteString(mdl.OpUser.ID)
|
||||||
sb.WriteString("删除了消息: ")
|
sb.WriteString(" 删除了消息: ")
|
||||||
sb.WriteString(mdl.Message.String())
|
sb.WriteString(mdl.Message.String())
|
||||||
return sb.String()
|
return sb.String()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user