Apply formatting and minor style fixes across repo
Normalize code style across multiple packages: whitespace cleanup, consistent commas and trailing commas in arrays/enums/objects, fix table markdown lines in CI comment template, ensure newline at EOF, normalize header/object property quoting and spacing, remove stray blank lines and minor non-functional comment tweaks. These are formatting-only changes and small type/annotation spacing adjustments; no functional behavior changes intended.
This commit is contained in:
1 parent
d2d0b258bc
commit
974528fe7e
186 files changed
+1367
-1233
No files matched your search
@@ -21,8 +21,9 @@ class DeleteMsg extends OneBotAction<PayloadType, ReturnType> {
|
||||
override actionDescription = '撤回已发送的消息';
|
||||
override actionTags = ['消息接口'];
|
||||
override payloadExample = {
|
||||
message_id: 12345
|
||||
message_id: 12345,
|
||||
};
|
||||
|
||||
override returnExample = null;
|
||||
|
||||
async _handle (payload: PayloadType) {
|
||||
|
||||
@@ -22,8 +22,9 @@ class ForwardSingleMsg extends OneBotAction<PayloadType, ReturnType> {
|
||||
override actionTags = ['消息接口'];
|
||||
override payloadExample = {
|
||||
message_id: 12345,
|
||||
group_id: '123456'
|
||||
group_id: '123456',
|
||||
};
|
||||
|
||||
override returnExample = null;
|
||||
|
||||
protected async getTargetPeer (payload: PayloadType): Promise<Peer> {
|
||||
|
||||
@@ -21,8 +21,9 @@ class MarkMsgAsRead extends OneBotAction<PayloadType, ReturnType> {
|
||||
override actionDescription = '标记指定渠道的消息为已读';
|
||||
override actionTags = ['消息接口'];
|
||||
override payloadExample = {
|
||||
message_id: 12345
|
||||
message_id: 12345,
|
||||
};
|
||||
|
||||
override returnExample = null;
|
||||
|
||||
async getPeer (payload: PayloadType): Promise<Peer> {
|
||||
|
||||
@@ -219,7 +219,7 @@ export class SendMsgBase extends OneBotAction<SendMsgPayload, ReturnDataType> {
|
||||
} | null> {
|
||||
const packetMsg: PacketMsg[] = [];
|
||||
const delFiles: string[] = [];
|
||||
const innerMsg: Array<{ uuid: string, packetMsg?: PacketMsg[], actionMsgBody?: UploadForwardMsgParams['actionMsgBody']; }> = new Array();
|
||||
const innerMsg: Array<{ uuid: string, packetMsg?: PacketMsg[], actionMsgBody?: UploadForwardMsgParams['actionMsgBody']; }> = [];
|
||||
for (const node of messageNodes) {
|
||||
if (dp >= 3) {
|
||||
this.core.context.logger.logWarn('转发消息深度超过3层,将停止解析!');
|
||||
@@ -243,7 +243,6 @@ export class SendMsgBase extends OneBotAction<SendMsgPayload, ReturnDataType> {
|
||||
innerMsg.push(m);
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
const sendElementsCreateReturn = await this.obContext.apis.MsgApi.createSendElements(OB11Data, msgPeer);
|
||||
sendElements = sendElementsCreateReturn.sendElements;
|
||||
@@ -340,8 +339,8 @@ export class SendMsgBase extends OneBotAction<SendMsgPayload, ReturnDataType> {
|
||||
},
|
||||
} as SendArkElement,
|
||||
res_id: resid,
|
||||
uuid: uuid,
|
||||
packetMsg: packetMsg,
|
||||
uuid,
|
||||
packetMsg,
|
||||
innerPacketMsg: innerMsg,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -9,10 +9,11 @@ class SendPrivateMsg extends SendMsgBase {
|
||||
override actionTags = ['消息接口'];
|
||||
override payloadExample = {
|
||||
user_id: '123456789',
|
||||
message: 'hello'
|
||||
message: 'hello',
|
||||
};
|
||||
|
||||
override returnExample = {
|
||||
message_id: 123456
|
||||
message_id: 123456,
|
||||
};
|
||||
|
||||
protected override async check (payload: SendMsgPayload): Promise<BaseCheckResult> {
|
||||
|
||||
@@ -22,11 +22,13 @@ export class SetMsgEmojiLike extends OneBotAction<PayloadType, ReturnType> {
|
||||
override payloadExample = {
|
||||
message_id: 12345,
|
||||
emoji_id: '123',
|
||||
set: true
|
||||
set: true,
|
||||
};
|
||||
|
||||
override returnExample = {
|
||||
result: true
|
||||
result: true,
|
||||
};
|
||||
|
||||
override payloadSchema = PayloadSchema;
|
||||
override returnSchema = ReturnSchema;
|
||||
|
||||
|
||||
Reference in new issue
Block a user