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
6101c4d8
Commit
6101c4d8
authored
Sep 13, 2020
by
Mrs4s
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: honor changed event.
parent
e9db10c9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
3 deletions
+26
-3
coolq/event.go
coolq/event.go
+23
-0
go.mod
go.mod
+1
-1
go.sum
go.sum
+2
-2
No files found.
coolq/event.go
View file @
6101c4d8
...
...
@@ -238,6 +238,29 @@ func (bot *CQBot) groupNotifyEvent(c *client.QQClient, e client.IGroupNotifyEven
"lucky_king_id"
:
notify
.
LuckyKing
,
"time"
:
time
.
Now
()
.
Unix
(),
})
case
*
client
.
MemberHonorChangedNotifyEvent
:
log
.
Info
(
notify
.
Content
())
bot
.
dispatchEventMessage
(
MSG
{
"post_type"
:
"notice"
,
"group_id"
:
group
.
Code
,
"notice_type"
:
"notify"
,
"notify_type"
:
"honor"
,
"self_id"
:
c
.
Uin
,
"user_id"
:
notify
.
Uin
,
"time"
:
time
.
Now
()
.
Unix
(),
"honor_type"
:
func
()
string
{
switch
notify
.
Honor
{
case
client
.
Talkative
:
return
"talkative"
case
client
.
Performer
:
return
"performer"
case
client
.
Emotion
:
return
"emotion"
default
:
return
"ERROR"
}
}(),
})
}
}
...
...
go.mod
View file @
6101c4d8
...
...
@@ -3,7 +3,7 @@ module github.com/Mrs4s/go-cqhttp
go 1.14
require (
github.com/Mrs4s/MiraiGo v0.0.0-2020091
2123655-d92d61c5998e
github.com/Mrs4s/MiraiGo v0.0.0-2020091
3112343-ad5531c3db09
github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239 // indirect
github.com/gin-gonic/gin v1.6.3
github.com/go-playground/validator/v10 v10.3.0 // indirect
...
...
go.sum
View file @
6101c4d8
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/Mrs4s/MiraiGo v0.0.0-2020091
2123655-d92d61c5998e h1:wiaXXMPnYCfA+rX1wy9SNrDyW3O43wfun5dIYKKK3BI
=
github.com/Mrs4s/MiraiGo v0.0.0-2020091
2123655-d92d61c5998e
/go.mod h1:cwYPI2uq6nxNbx0nA6YuAKF1V5szSs6FPlGVLQvRUlo=
github.com/Mrs4s/MiraiGo v0.0.0-2020091
3112343-ad5531c3db09 h1:zTe9IBmO+z6icSwjT2PgI9aMIIwlfWc00cFEz2+j9rc
=
github.com/Mrs4s/MiraiGo v0.0.0-2020091
3112343-ad5531c3db09
/go.mod h1:cwYPI2uq6nxNbx0nA6YuAKF1V5szSs6FPlGVLQvRUlo=
github.com/bwmarrin/snowflake v0.3.0 h1:xm67bEhkKh6ij1790JB83OujPR5CzNe8QuQqAgISZN0=
github.com/bwmarrin/snowflake v0.3.0/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
...
...
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