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
2b00b497
Commit
2b00b497
authored
Sep 05, 2020
by
wdvxdr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: fit onebot
适配onebot标准
parent
a77977b1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
docs/cqhttp.md
docs/cqhttp.md
+1
-1
server/http.go
server/http.go
+1
-1
server/websocket.go
server/websocket.go
+1
-1
No files found.
docs/cqhttp.md
View file @
2b00b497
...
...
@@ -209,7 +209,7 @@ json中的字符串需要进行转义:
| 字段 | 类型 | 说明 |
| -------- | ------ | ---- |
| group_id | int64 | 群号 |
| name | string | 新名 |
|
group_
name | string | 新名 |
### 获取图片信息
...
...
server/http.go
View file @
2b00b497
...
...
@@ -347,7 +347,7 @@ func (s *httpServer) SetWholeBan(c *gin.Context) {
func
(
s
*
httpServer
)
SetGroupName
(
c
*
gin
.
Context
)
{
gid
,
_
:=
strconv
.
ParseInt
(
getParam
(
c
,
"group_id"
),
10
,
64
)
c
.
JSON
(
200
,
s
.
bot
.
CQSetGroupName
(
gid
,
getParam
(
c
,
"name"
)))
c
.
JSON
(
200
,
s
.
bot
.
CQSetGroupName
(
gid
,
getParam
(
c
,
"
group_
name"
)))
}
func
(
s
*
httpServer
)
SetGroupLeave
(
c
*
gin
.
Context
)
{
...
...
server/websocket.go
View file @
2b00b497
...
...
@@ -477,7 +477,7 @@ var wsApi = map[string]func(*coolq.CQBot, gjson.Result) coolq.MSG{
}())
},
"set_group_name"
:
func
(
bot
*
coolq
.
CQBot
,
p
gjson
.
Result
)
coolq
.
MSG
{
return
bot
.
CQSetGroupName
(
p
.
Get
(
"group_id"
)
.
Int
(),
p
.
Get
(
"name"
)
.
Str
)
return
bot
.
CQSetGroupName
(
p
.
Get
(
"group_id"
)
.
Int
(),
p
.
Get
(
"
group_
name"
)
.
Str
)
},
"set_group_leave"
:
func
(
bot
*
coolq
.
CQBot
,
p
gjson
.
Result
)
coolq
.
MSG
{
return
bot
.
CQSetGroupLeave
(
p
.
Get
(
"group_id"
)
.
Int
())
...
...
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