mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
8d5eac7f80
@ -12,4 +12,5 @@
|
|||||||
12. 修复群成员加入时间 上次活跃 活跃等级字段 - 影响 API: /get_group_member_info /get_group_member_list
|
12. 修复群成员加入时间 上次活跃 活跃等级字段 - 影响 API: /get_group_member_info /get_group_member_list
|
||||||
13. 修复视频所需的 ffmpeg 路径不正确导致视频封面和时长获取失败 - 影响 Event/API
|
13. 修复视频所需的 ffmpeg 路径不正确导致视频封面和时长获取失败 - 影响 Event/API
|
||||||
14. 支持音乐卡片,需要配置签名服务器地址, `config/onebot11_<qq>.json`的`musicSignUrl`字段 - 新增 Feat: Sign Music
|
14. 支持音乐卡片,需要配置签名服务器地址, `config/onebot11_<qq>.json`的`musicSignUrl`字段 - 新增 Feat: Sign Music
|
||||||
15. 支持获取与设置群公告 - 新增 API: /_send_group_notice /_get_group_notice
|
15. 支持获取与设置群公告 - 新增 API: (/_send_group_notice 暂时未完全实现) /_get_group_notice
|
||||||
|
|
||||||
|
2
src/core
2
src/core
@ -1 +1 @@
|
|||||||
Subproject commit 0252eba3beb5adeac068a8de069f1f82e9cf9b8d
|
Subproject commit aa3221a8904bf6b66cb85325cda85cbcea5639a0
|
@ -1,3 +1,4 @@
|
|||||||
|
import { WebApi, WebApiGroupNoticeRet } from '@/core/apis/webapi';
|
||||||
import BaseAction from '../BaseAction';
|
import BaseAction from '../BaseAction';
|
||||||
import { ActionName } from '../types';
|
import { ActionName } from '../types';
|
||||||
|
|
||||||
@ -5,12 +6,15 @@ interface PayloadType {
|
|||||||
group_id: number
|
group_id: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GetGroupNotice extends BaseAction<PayloadType, null> {
|
export class GetGroupNotice extends BaseAction<PayloadType, WebApiGroupNoticeRet> {
|
||||||
actionName = ActionName.GoCQHTTP_GetGroupNotice;
|
actionName = ActionName.GoCQHTTP_GetGroupNotice;
|
||||||
|
|
||||||
protected async _handle(payload: PayloadType) {
|
protected async _handle(payload: PayloadType) {
|
||||||
const group = payload.group_id.toString();
|
const group = payload.group_id.toString();
|
||||||
// WebApi.getGrouptNotice(group);
|
let ret = await WebApi.getGrouptNotice(group);
|
||||||
return null;
|
if (!ret) {
|
||||||
}
|
throw new Error('获取公告失败');
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,3 +1,4 @@
|
|||||||
|
import { WebApi } from '@/core/apis/webapi';
|
||||||
import BaseAction from '../BaseAction';
|
import BaseAction from '../BaseAction';
|
||||||
import { ActionName } from '../types';
|
import { ActionName } from '../types';
|
||||||
|
|
||||||
@ -10,7 +11,7 @@ export class SetGroupNotice extends BaseAction<PayloadType, null> {
|
|||||||
|
|
||||||
protected async _handle(payload: PayloadType) {
|
protected async _handle(payload: PayloadType) {
|
||||||
const group = payload.group_id.toString();
|
const group = payload.group_id.toString();
|
||||||
// WebApi.getGrouptNotice(group);
|
WebApi.setGroupNotice(group);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -49,6 +49,7 @@ import { GetCookies } from './user/GetCookies';
|
|||||||
import { SetMsgEmojiLike } from '@/onebot11/action/msg/SetMsgEmojiLike';
|
import { SetMsgEmojiLike } from '@/onebot11/action/msg/SetMsgEmojiLike';
|
||||||
import { GetRobotUinRange } from './extends/GetRobotUinRange';
|
import { GetRobotUinRange } from './extends/GetRobotUinRange';
|
||||||
import { SetOnlineStatus } from './extends/SetOnlineStatus';
|
import { SetOnlineStatus } from './extends/SetOnlineStatus';
|
||||||
|
import { GetGroupNotice } from './group/GetGroupNotice';
|
||||||
|
|
||||||
export const actionHandlers = [
|
export const actionHandlers = [
|
||||||
new GetFile(),
|
new GetFile(),
|
||||||
@ -90,6 +91,7 @@ export const actionHandlers = [
|
|||||||
new SetOnlineStatus(),
|
new SetOnlineStatus(),
|
||||||
new GetRobotUinRange(),
|
new GetRobotUinRange(),
|
||||||
//以下为go-cqhttp api
|
//以下为go-cqhttp api
|
||||||
|
new GetGroupNotice(),
|
||||||
new GoCQHTTPSendForwardMsg(),
|
new GoCQHTTPSendForwardMsg(),
|
||||||
new GoCQHTTPSendGroupForwardMsg(),
|
new GoCQHTTPSendGroupForwardMsg(),
|
||||||
new GoCQHTTPSendPrivateForwardMsg(),
|
new GoCQHTTPSendPrivateForwardMsg(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user