Skip to content

Commit

Permalink
fix: split time
Browse files Browse the repository at this point in the history
  • Loading branch information
deanxv committed May 27, 2024
1 parent b805429 commit e53d42e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion common/constants.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
6 changes: 3 additions & 3 deletions discord/discord.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 版本下 用户端发送消息
Expand All @@ -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
Expand Down

0 comments on commit e53d42e

Please sign in to comment.