mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 03:23:49 +08:00
fix: fit onebot
适配onebot标准
This commit is contained in:
parent
a77977b12e
commit
2b00b49755
@ -209,7 +209,7 @@ json中的字符串需要进行转义:
|
|||||||
| 字段 | 类型 | 说明 |
|
| 字段 | 类型 | 说明 |
|
||||||
| -------- | ------ | ---- |
|
| -------- | ------ | ---- |
|
||||||
| group_id | int64 | 群号 |
|
| group_id | int64 | 群号 |
|
||||||
| name | string | 新名 |
|
| group_name | string | 新名 |
|
||||||
|
|
||||||
### 获取图片信息
|
### 获取图片信息
|
||||||
|
|
||||||
|
@ -347,7 +347,7 @@ func (s *httpServer) SetWholeBan(c *gin.Context) {
|
|||||||
|
|
||||||
func (s *httpServer) SetGroupName(c *gin.Context) {
|
func (s *httpServer) SetGroupName(c *gin.Context) {
|
||||||
gid, _ := strconv.ParseInt(getParam(c, "group_id"), 10, 64)
|
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) {
|
func (s *httpServer) SetGroupLeave(c *gin.Context) {
|
||||||
|
@ -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 {
|
"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 {
|
"set_group_leave": func(bot *coolq.CQBot, p gjson.Result) coolq.MSG {
|
||||||
return bot.CQSetGroupLeave(p.Get("group_id").Int())
|
return bot.CQSetGroupLeave(p.Get("group_id").Int())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user