From e53d42e8a29319dc6f44bfc979009af022986f86 Mon Sep 17 00:00:00 2001 From: dean <1006393151@qq.com> Date: Mon, 27 May 2024 19:47:18 +0800 Subject: [PATCH] fix: split time --- common/constants.go | 2 +- discord/discord.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/constants.go b/common/constants.go index 082e312a..874492c0 100644 --- a/common/constants.go +++ b/common/constants.go @@ -1,6 +1,6 @@ package common -var Version = "v4.4.11" // this hard coding will be replaced automatically when building, no need to manually change +var Version = "v4.4.12" // this hard coding will be replaced automatically when building, no need to manually change const ( RequestIdKey = "X-Request-Id" diff --git a/discord/discord.go b/discord/discord.go index f17e8d37..fe084df3 100644 --- a/discord/discord.go +++ b/discord/discord.go @@ -471,7 +471,7 @@ func SendMessage(c *gin.Context, channelID, cozeBotId, message string) (*discord return nil, "", err } - for i, sendContent := range common.ReverseSegment(content, 1888) { + for i, sendContent := range common.ReverseSegment(content, 1990) { //sentMsg, myerr := Session.ChannelMessageSend(channelID, sendContent) //sentMsgId := sentMsg.ID // 4.0.0 版本下 用户端发送消息 @@ -488,9 +488,9 @@ func SendMessage(c *gin.Context, channelID, cozeBotId, message string) (*discord return nil, "", fmt.Errorf("error sending message") } - //time.Sleep(1 * time.Second) + time.Sleep(500 * time.Millisecond) - if i == len(common.ReverseSegment(content, 1888))-1 { + if i == len(common.ReverseSegment(content, 1990))-1 { return &discordgo.Message{ ID: sentMsgId, }, userAuth, nil