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
@@ -23,11 +23,12 @@ export class GetCookies extends OneBotAction<GetCookiesPayload, GetCookiesRespon
|
||||
override actionDescription = '获取指定域名的 Cookies';
|
||||
override actionTags = ['用户接口'];
|
||||
override payloadExample = {
|
||||
domain: 'qun.qq.com'
|
||||
domain: 'qun.qq.com',
|
||||
};
|
||||
|
||||
override returnExample = {
|
||||
cookies: 'uin=o123456789; skey=@abc12345;',
|
||||
bkn: '123456789'
|
||||
bkn: '123456789',
|
||||
};
|
||||
|
||||
async _handle (payload: GetCookiesPayload) {
|
||||
|
||||
@@ -31,16 +31,17 @@ export default class GetRecentContact extends OneBotAction<GetRecentContactPaylo
|
||||
override actionDescription = '获取最近会话';
|
||||
override actionTags = ['用户接口'];
|
||||
override payloadExample = {
|
||||
count: 10
|
||||
count: 10,
|
||||
};
|
||||
|
||||
override returnExample = [
|
||||
{
|
||||
peerUin: '123456',
|
||||
peerName: '测试',
|
||||
msgTime: '1734567890',
|
||||
msgId: '12345',
|
||||
lastestMsg: {}
|
||||
}
|
||||
lastestMsg: {},
|
||||
},
|
||||
];
|
||||
|
||||
async _handle (payload: GetRecentContactPayload, _adapter: string, config: NetworkAdapterConfig): Promise<GetRecentContactReturn> {
|
||||
|
||||
@@ -17,11 +17,12 @@ export default class SendLike extends OneBotAction<SendLikePayload, void> {
|
||||
override actionTags = ['用户接口'];
|
||||
override payloadExample = {
|
||||
user_id: '123456',
|
||||
times: 10
|
||||
times: 10,
|
||||
};
|
||||
|
||||
override returnExample = {};
|
||||
override errorExamples = [
|
||||
{ code: 1400, description: '点赞失败(频率过快或用户不存在)' }
|
||||
{ code: 1400, description: '点赞失败(频率过快或用户不存在)' },
|
||||
];
|
||||
|
||||
async _handle (payload: SendLikePayload): Promise<void> {
|
||||
|
||||
@@ -20,8 +20,9 @@ export default class SetFriendAddRequest extends OneBotAction<SetFriendAddReques
|
||||
override payloadExample = {
|
||||
flag: 'flag_12345',
|
||||
approve: true,
|
||||
remark: '新朋友'
|
||||
remark: '新朋友',
|
||||
};
|
||||
|
||||
override returnExample = {};
|
||||
|
||||
async _handle (payload: SetFriendAddRequestPayload): Promise<void> {
|
||||
|
||||
@@ -2,7 +2,6 @@ import { OneBotAction } from '@/napcat-onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/napcat-onebot/action/router';
|
||||
import { Static, Type } from '@sinclair/typebox';
|
||||
|
||||
|
||||
export const SetFriendRemarkPayloadSchema = Type.Object({
|
||||
user_id: Type.String({ description: '对方 QQ 号' }),
|
||||
remark: Type.String({ description: '备注内容' }),
|
||||
@@ -19,11 +18,12 @@ export default class SetFriendRemark extends OneBotAction<SetFriendRemarkPayload
|
||||
override actionTags = ['用户接口'];
|
||||
override payloadExample = {
|
||||
user_id: '123456',
|
||||
remark: '测试备注'
|
||||
remark: '测试备注',
|
||||
};
|
||||
|
||||
override returnExample = null;
|
||||
override errorExamples = [
|
||||
{ code: 1400, description: '备注设置失败(好友不存在或非法输入)' }
|
||||
{ code: 1400, description: '备注设置失败(好友不存在或非法输入)' },
|
||||
];
|
||||
|
||||
async _handle (payload: SetFriendRemarkPayload): Promise<void> {
|
||||
|
||||
Reference in new issue
Block a user