Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
go-cqhttp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
go-cqhttp
Commits
a991add7
Commit
a991add7
authored
Sep 05, 2020
by
Mrs4s
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update default heartbeat value. close #232
parent
42434956
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
coolq/bot.go
coolq/bot.go
+4
-1
No files found.
coolq/bot.go
View file @
a991add7
...
@@ -71,10 +71,13 @@ func NewQQBot(cli *client.QQClient, conf *global.JsonConfig) *CQBot {
...
@@ -71,10 +71,13 @@ func NewQQBot(cli *client.QQClient, conf *global.JsonConfig) *CQBot {
bot
.
Client
.
OnUserWantJoinGroup
(
bot
.
groupJoinReqEvent
)
bot
.
Client
.
OnUserWantJoinGroup
(
bot
.
groupJoinReqEvent
)
go
func
()
{
go
func
()
{
i
:=
conf
.
HeartbeatInterval
i
:=
conf
.
HeartbeatInterval
if
i
<
1
{
if
i
<
0
{
log
.
Warn
(
"警告: 心跳功能已关闭,若非预期,请检查配置文件。"
)
log
.
Warn
(
"警告: 心跳功能已关闭,若非预期,请检查配置文件。"
)
return
return
}
}
if
i
==
0
{
i
=
5
}
for
{
for
{
time
.
Sleep
(
time
.
Second
*
i
)
time
.
Sleep
(
time
.
Second
*
i
)
bot
.
dispatchEventMessage
(
MSG
{
bot
.
dispatchEventMessage
(
MSG
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment