mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
fix
This commit is contained in:
parent
686a426cda
commit
5c6acbb780
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
@ -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