Skip to content

Commit 973a28c

Browse files
authored
perf(coser): 回复图片加点延时,避免危险 (#30)
1 parent d4af3d5 commit 973a28c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

plugins/coser/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"net/http"
66
"strconv"
77
"strings"
8+
"time"
89

910
"github.com/imroc/req/v3"
1011
"modernc.org/mathutil"
@@ -43,6 +44,7 @@ func reply(ctx *robot.Ctx, num int) {
4344
ctx.ReplyTextAndAt(title)
4445
for _, url := range imageUrls {
4546
ctx.ReplyImage(url)
47+
time.Sleep(2 * time.Second)
4648
}
4749
}
4850
}

0 commit comments

Comments
 (0)