Skip to content
This repository was archived by the owner on Jul 27, 2024. It is now read-only.

Commit 2c453ab

Browse files
authored
Merge pull request #3 from opq-osc/beta
添加断线重连 和 Wait() 函数
2 parents ee87b6c + 27534a4 commit 2c453ab

File tree

2 files changed

+304
-244
lines changed

2 files changed

+304
-244
lines changed

example/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ func main() {
2222
opqBot := OPQBot.NewBotManager(2629326992, os.Args[1])
2323
// 设置发送队列每次发送的间隔时间 默认1000ms
2424
opqBot.SetSendDelayed(1000)
25+
opqBot.SetMaxRetryCount(5)
2526
err := opqBot.Start()
2627
if err != nil {
2728
log.Println(err.Error())
@@ -281,7 +282,7 @@ func main() {
281282
// ToUserUid: 2435932516,
282283
// Content: OPQBot.SendTypePicMsgByUrlContent{Content: "你好", PicUrl: "https://img-home.csdnimg.cn/images/20201124032511.png"},
283284
//})
284-
time.Sleep(24 * time.Hour)
285+
opqBot.Wait()
285286
}
286287
func VerifyBlackList(botQQ int64, packet OPQBot.GroupMsgPack) {
287288
if packet.FromUserID == 123123123 {

0 commit comments

Comments
 (0)