mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
2
src/core
2
src/core
Submodule src/core updated: aa3221a890...e5a4b1b941
24
src/onebot11/action/group/GetGroupEssence.ts
Normal file
24
src/onebot11/action/group/GetGroupEssence.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { getGroup } from '@/core/data';
|
||||
import { OB11Group } from '../../types';
|
||||
import { OB11Constructor } from '../../constructor';
|
||||
import BaseAction from '../BaseAction';
|
||||
import { ActionName } from '../types';
|
||||
import { NTQQMsgApi } from '@/core/apis/msg';
|
||||
import { GroupEssenceMsgRet, WebApi } from '@/core/apis/webapi';
|
||||
|
||||
interface PayloadType {
|
||||
group_id: number;
|
||||
pages: number;
|
||||
}
|
||||
|
||||
export class GetGroupEssence extends BaseAction<PayloadType, GroupEssenceMsgRet> {
|
||||
actionName = ActionName.GoCQHTTP_GetEssenceMsg;
|
||||
|
||||
protected async _handle(payload: PayloadType) {
|
||||
let ret = await WebApi.getGroupEssenceMsg(payload.group_id.toString(), payload.pages.toString());
|
||||
if (!ret) {
|
||||
throw new Error('获取失败');
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
@@ -50,6 +50,7 @@ import { SetMsgEmojiLike } from '@/onebot11/action/msg/SetMsgEmojiLike';
|
||||
import { GetRobotUinRange } from './extends/GetRobotUinRange';
|
||||
import { SetOnlineStatus } from './extends/SetOnlineStatus';
|
||||
import { GetGroupNotice } from './group/GetGroupNotice';
|
||||
import { GetGroupEssence } from './group/GetGroupEssence';
|
||||
|
||||
export const actionHandlers = [
|
||||
new GetFile(),
|
||||
@@ -92,6 +93,7 @@ export const actionHandlers = [
|
||||
new GetRobotUinRange(),
|
||||
//以下为go-cqhttp api
|
||||
new GetGroupNotice(),
|
||||
new GetGroupEssence(),
|
||||
new GoCQHTTPSendForwardMsg(),
|
||||
new GoCQHTTPSendGroupForwardMsg(),
|
||||
new GoCQHTTPSendPrivateForwardMsg(),
|
||||
|
@@ -56,6 +56,7 @@ export enum ActionName {
|
||||
GetRobotUinRange = 'get_robot_uin_range',
|
||||
SetOnlineStatus = 'set_online_status',
|
||||
// 以下为go-cqhttp api
|
||||
GoCQHTTP_GetEssenceMsg='get_essence_msg_list',
|
||||
GoCQHTTP_SetGroupNotice = '_send_group_notice',
|
||||
GoCQHTTP_GetGroupNotice = '_get_group_notice',
|
||||
GoCQHTTP_SendForwardMsg = 'send_forward_msg',
|
||||
|
Reference in New Issue
Block a user