Merge remote-tracking branch 'origin/main'

This commit is contained in:
linyuchen
2024-04-28 18:54:03 +08:00
97 changed files with 224 additions and 164 deletions

View File

@@ -6,11 +6,11 @@ interface PayloadType {
}
export class GetGroupNotice extends BaseAction<PayloadType, null> {
actionName = ActionName.GetGroupNotice;
actionName = ActionName.GoCQHTTP_GetGroupNotice;
protected async _handle(payload: PayloadType) {
const group = payload.group_id.toString();
// WebApi.getGrouptNotice(group);
return null;
}
protected async _handle(payload: PayloadType) {
const group = payload.group_id.toString();
// WebApi.getGrouptNotice(group);
return null;
}
}

View File

@@ -0,0 +1,16 @@
import BaseAction from '../BaseAction';
import { ActionName } from '../types';
interface PayloadType {
group_id: number
}
export class SetGroupNotice extends BaseAction<PayloadType, null> {
actionName = ActionName.GoCQHTTP_SetGroupNotice;
protected async _handle(payload: PayloadType) {
const group = payload.group_id.toString();
// WebApi.getGrouptNotice(group);
return null;
}
}

View File

@@ -53,10 +53,11 @@ export enum ActionName {
CleanCache = 'clean_cache',
GetCookies = 'get_cookies',
// 以下为扩展napcat扩展
GetGroupNotice = 'get_group_notice',
GetRobotUinRange = 'get_robot_uin_range',
SetOnlineStatus = 'set_online_status',
// 以下为go-cqhttp api
GoCQHTTP_SetGroupNotice = '_send_group_notice',
GoCQHTTP_GetGroupNotice = '_get_group_notice',
GoCQHTTP_SendForwardMsg = 'send_forward_msg',
GoCQHTTP_SendGroupForwardMsg = 'send_group_forward_msg',
GoCQHTTP_SendPrivateForwardMsg = 'send_private_forward_msg',

View File

@@ -8,7 +8,7 @@ interface Payload {
domain: string
}
interface Response {
Pskey: Object;
Pskey: object;
Skey: string;
}
export class GetCookies extends BaseAction<Payload, Response> {

View File

@@ -1,4 +1,4 @@
import {OB11GroupNoticeEvent} from "./OB11GroupNoticeEvent";
import { OB11GroupNoticeEvent } from './OB11GroupNoticeEvent';
export interface MsgEmojiLike {
emoji_id: string,
@@ -6,10 +6,10 @@ export interface MsgEmojiLike {
}
export class OB11GroupMsgEmojiLikeEvent extends OB11GroupNoticeEvent {
notice_type = "group_msg_emoji_like";
notice_type = 'group_msg_emoji_like';
message_id: number;
sub_type: "ban" | "lift_ban";
likes: MsgEmojiLike[]
sub_type: 'ban' | 'lift_ban';
likes: MsgEmojiLike[];
constructor(groupId: number, userId: number, messageId: number, likes: MsgEmojiLike[]) {
super();