mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 19:43:49 +08:00
update default heartbeat value. close #232
This commit is contained in:
parent
42434956d9
commit
a991add799
@ -71,10 +71,13 @@ func NewQQBot(cli *client.QQClient, conf *global.JsonConfig) *CQBot {
|
||||
bot.Client.OnUserWantJoinGroup(bot.groupJoinReqEvent)
|
||||
go func() {
|
||||
i := conf.HeartbeatInterval
|
||||
if i < 1 {
|
||||
if i < 0 {
|
||||
log.Warn("警告: 心跳功能已关闭,若非预期,请检查配置文件。")
|
||||
return
|
||||
}
|
||||
if i == 0 {
|
||||
i = 5
|
||||
}
|
||||
for {
|
||||
time.Sleep(time.Second * i)
|
||||
bot.dispatchEventMessage(MSG{
|
||||
|
Loading…
x
Reference in New Issue
Block a user