node-karin 1.10.11 → 1.10.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # 更新日志
2
2
 
3
+ ## [1.10.12](https://github.com/KarinJS/Karin/compare/core-v1.10.11...core-v1.10.12) (2025-06-28)
4
+
5
+
6
+ ### 🐛 Bug Fixes
7
+
8
+ * close [#453](https://github.com/KarinJS/Karin/issues/453) ([11119b2](https://github.com/KarinJS/Karin/commit/11119b27b49d1b82b81d7d3938e9478ee8ad1798))
9
+
3
10
  ## [1.10.11](https://github.com/KarinJS/Karin/compare/core-v1.10.10...core-v1.10.11) (2025-06-28)
4
11
 
5
12
 
package/dist/index.d.ts CHANGED
@@ -997,7 +997,7 @@ interface QQGroupHonorInfo {
997
997
  */
998
998
  interface QQGroupFileInfo {
999
999
  /** 文件ID */
1000
- id: string;
1000
+ fid: string;
1001
1001
  /** 文件名 */
1002
1002
  name: string;
1003
1003
  /** 文件大小 */
@@ -1034,7 +1034,7 @@ interface QQGroupFolderInfo {
1034
1034
  fileCount: number;
1035
1035
  /** 创建时间 */
1036
1036
  createTime: number;
1037
- /** 创建者UID */
1037
+ /** 创建者ID */
1038
1038
  creatorId: string;
1039
1039
  /** 创建者昵称 */
1040
1040
  creatorName: string;
@@ -1066,11 +1066,11 @@ interface GetGroupFileListResponse {
1066
1066
  interface GetGroupFileSystemInfoResponse {
1067
1067
  /** 文件数量 */
1068
1068
  fileCount: number;
1069
- /** 文件夹数量 */
1070
- totalCount: number;
1069
+ /** 文件上限 */
1070
+ limitCount: number;
1071
1071
  /** 已使用空间 */
1072
1072
  usedSpace: number;
1073
- /** 总空间 */
1073
+ /** 空间上限 */
1074
1074
  totalSpace: number;
1075
1075
  }
1076
1076
  /** 创建群文件夹返回值结构 */
@@ -1112,6 +1112,26 @@ interface DownloadFileResponse {
1112
1112
  /** 下载后文件的绝对路径 */
1113
1113
  filePath: string;
1114
1114
  }
1115
+ /** 获取 rkey 返回值结构 */
1116
+ interface GetRkeyResponse {
1117
+ /** 可使用的场景 */
1118
+ type: 'private' | 'group';
1119
+ /** rkey */
1120
+ rkey: string;
1121
+ /** 创建时间 */
1122
+ created_at: number;
1123
+ /** 过期时间 */
1124
+ ttl: number;
1125
+ }
1126
+ /** 获取群 Ai 语音可用声色列表返回值结构 */
1127
+ interface GetAiCharactersResponse {
1128
+ /** 声色ID */
1129
+ character_id: string;
1130
+ /** 声色名称 */
1131
+ character_name: string;
1132
+ /** 声色预览URL */
1133
+ preview_url: string;
1134
+ }
1115
1135
 
1116
1136
  /** 适配器类型 */
1117
1137
  interface AdapterType<T = any> {
@@ -1462,7 +1482,7 @@ interface AdapterType<T = any> {
1462
1482
  */
1463
1483
  getGroupFileSystemInfo(groupId: string): Promise<GetGroupFileSystemInfoResponse>;
1464
1484
  /**
1465
- * 获取群文件夹下文件列表
1485
+ * 获取群文件夹下的文件列表
1466
1486
  * @param groupId 群号
1467
1487
  * @param folderId 文件夹id,空则为根目录
1468
1488
  * @returns 返回文件和文件夹的列表
@@ -1516,20 +1536,36 @@ interface AdapterType<T = any> {
1516
1536
  }>;
1517
1537
  /**
1518
1538
  * 获取 CSRF Token
1519
- * @param domain The domain to get the CSRF token from
1520
1539
  */
1521
- getCSRFToken(domain: string): Promise<{
1540
+ getCSRFToken(): Promise<{
1522
1541
  token: number;
1523
1542
  }>;
1524
1543
  /**
1525
- * 获取 HTTP Cookies
1526
- * @param appid The appid
1527
- * @param daid The daid
1528
- * @param jumpUrl The jump url
1544
+ * 设置头像
1545
+ * @param file base64:// file:// http(s)://
1546
+ * @returns 是否设置成功
1529
1547
  */
1530
- getHttpCookies(appid: string, daid: string, jumpUrl: string): Promise<{
1531
- cookie: string;
1548
+ setAvatar(file: string): Promise<boolean>;
1549
+ /**
1550
+ * 获取群 Ai 语音可用声色列表
1551
+ * @returns 声色列表
1552
+ */
1553
+ getAiCharacters(): Promise<Array<GetAiCharactersResponse>>;
1554
+ /**
1555
+ * 发送群 Ai 语音声色
1556
+ * @param group_id 群号
1557
+ * @param character_id 声色ID
1558
+ * @param text 转换的文本
1559
+ * @returns 是否设置成功
1560
+ */
1561
+ sendAiCharacter(group_id: string, character: string, text: string): Promise<{
1562
+ messageId: string;
1532
1563
  }>;
1564
+ /**
1565
+ * 获取 rkey
1566
+ * @returns rkey
1567
+ */
1568
+ getRkey(): Promise<Array<GetRkeyResponse>>;
1533
1569
  }
1534
1570
  /** 适配器类型 */
1535
1571
  type Adapter = AdapterType;
@@ -3451,19 +3487,35 @@ declare abstract class AdapterBase<T = any> implements AdapterType<T> {
3451
3487
  }>;
3452
3488
  /**
3453
3489
  * 获取 CSRF Token
3454
- * @param _domain The domain to get the CSRF token from
3455
3490
  */
3456
- getCSRFToken(_domain: string): Promise<{
3491
+ getCSRFToken(): Promise<{
3457
3492
  token: number;
3458
3493
  }>;
3459
3494
  /**
3460
- * 获取 HTTP Cookies
3461
- * @param _appid The appid
3462
- * @param _daid The daid
3463
- * @param _jumpUrl The jump url
3495
+ * 设置头像
3496
+ * @param file base64:// file:// http(s)://
3497
+ * @returns 是否设置成功
3464
3498
  */
3465
- getHttpCookies(_appid: string, _daid: string, _jumpUrl: string): Promise<{
3466
- cookie: string;
3499
+ setAvatar(_file: string): Promise<boolean>;
3500
+ /**
3501
+ * 获取 rkey
3502
+ * @returns rkey
3503
+ */
3504
+ getRkey(): Promise<Array<GetRkeyResponse>>;
3505
+ /**
3506
+ * 获取群 Ai 语音可用声色列表
3507
+ * @returns 声色列表
3508
+ */
3509
+ getAiCharacters(): Promise<Array<GetAiCharactersResponse>>;
3510
+ /**
3511
+ * 设置群 Ai 语音声色
3512
+ * @param _groupId 群号
3513
+ * @param _characterId 声色ID
3514
+ * @param _text 文本
3515
+ * @returns 是否设置成功
3516
+ */
3517
+ sendAiCharacter(_groupId: string, _characterId: string, _text: string): Promise<{
3518
+ messageId: string;
3467
3519
  }>;
3468
3520
  }
3469
3521
 
@@ -11837,12 +11889,11 @@ interface OneBotMessageApi {
11837
11889
  [OneBotMessageApiAction.getAiCharacters]: {
11838
11890
  action: 'get_ai_characters';
11839
11891
  params: Record<string, never>;
11840
- response: {
11841
- characters: Array<{
11842
- id: string;
11843
- name: string;
11844
- }>;
11845
- };
11892
+ response: Array<{
11893
+ character_id: string;
11894
+ character_name: string;
11895
+ preview_url: string;
11896
+ }>;
11846
11897
  };
11847
11898
  /** 社区扩展: 发送群 Ai 语音 */
11848
11899
  [OneBotMessageApiAction.sendGroupAiRecord]: {
@@ -13014,16 +13065,19 @@ interface OneBotBotApi {
13014
13065
  params: {
13015
13066
  file: string;
13016
13067
  };
13017
- response: {
13018
- success: boolean;
13019
- };
13068
+ response: void;
13020
13069
  };
13021
13070
  /** 社区扩展: 获取rkey */
13022
13071
  [OneBotBotApiAction.getRkey]: {
13023
13072
  action: 'get_rkey';
13024
13073
  params: Record<string, never>;
13025
13074
  response: {
13026
- rkey: string;
13075
+ rkeys: Array<{
13076
+ type: 'private' | 'group';
13077
+ rkey: string;
13078
+ created_at: number;
13079
+ ttl: number;
13080
+ }>;
13027
13081
  };
13028
13082
  };
13029
13083
  /** NapCat扩展: 获取NC版rkey */
@@ -13032,6 +13086,9 @@ interface OneBotBotApi {
13032
13086
  params: Record<string, never>;
13033
13087
  response: {
13034
13088
  rkey: string;
13089
+ ttl: number;
13090
+ time: number;
13091
+ type: number;
13035
13092
  };
13036
13093
  };
13037
13094
  /** Lagrange扩展: 获取mface key */
@@ -14204,11 +14261,10 @@ declare abstract class OneBotCore extends EventEmitter$1 {
14204
14261
  * @returns Ai声色列表
14205
14262
  */
14206
14263
  getAiCharacters(): Promise<{
14207
- characters: Array<{
14208
- id: string;
14209
- name: string;
14210
- }>;
14211
- }>;
14264
+ character_id: string;
14265
+ character_name: string;
14266
+ preview_url: string;
14267
+ }[]>;
14212
14268
  /**
14213
14269
  * 发送群 Ai 语音
14214
14270
  * @param group_id - 群ID
@@ -15228,20 +15284,26 @@ declare abstract class OneBotCore extends EventEmitter$1 {
15228
15284
  * 社区扩展: 设置QQ头像
15229
15285
  * @param file - 文件路径
15230
15286
  */
15231
- setQqAvatar(file: string): Promise<{
15232
- success: boolean;
15233
- }>;
15287
+ setQqAvatar(file: string): Promise<void>;
15234
15288
  /**
15235
15289
  * 社区扩展: 获取rkey
15236
15290
  */
15237
15291
  getRkey(): Promise<{
15238
- rkey: string;
15292
+ rkeys: Array<{
15293
+ type: "private" | "group";
15294
+ rkey: string;
15295
+ created_at: number;
15296
+ ttl: number;
15297
+ }>;
15239
15298
  }>;
15240
15299
  /**
15241
15300
  * NapCat扩展: 获取NC版rkey
15242
15301
  */
15243
15302
  nc_getRkey(): Promise<{
15244
15303
  rkey: string;
15304
+ ttl: number;
15305
+ time: number;
15306
+ type: number;
15245
15307
  }>;
15246
15308
  /**
15247
15309
  * Lagrange扩展: 获取mface key
@@ -16500,6 +16562,107 @@ declare class AdapterOneBot<T extends OneBotType> extends AdapterBase {
16500
16562
  * @returns 文件url
16501
16563
  */
16502
16564
  getFileUrl(contact: Contact, fid: string): Promise<string>;
16565
+ /**
16566
+ * 获取群文件系统信息
16567
+ * @param groupId 群ID
16568
+ * @returns 群文件系统信息
16569
+ */
16570
+ getGroupFileSystemInfo(groupId: string): Promise<{
16571
+ fileCount: number;
16572
+ limitCount: number;
16573
+ usedSpace: number;
16574
+ totalSpace: number;
16575
+ file_count: number;
16576
+ limit_count: number;
16577
+ used_space: number;
16578
+ total_space: number;
16579
+ }>;
16580
+ /**
16581
+ * 获取群文件列表
16582
+ * @param groupId 群ID
16583
+ * @param folderId 文件夹ID
16584
+ * @returns 群文件列表
16585
+ */
16586
+ getGroupFileList(groupId: string, folderId?: string): Promise<{
16587
+ files: {
16588
+ fid: string;
16589
+ name: string;
16590
+ size: number;
16591
+ uploadTime: number;
16592
+ expireTime: number;
16593
+ modifyTime: number;
16594
+ downloadCount: number;
16595
+ uploadId: string;
16596
+ uploadName: string;
16597
+ sha1: string;
16598
+ sha3: string;
16599
+ md5: string;
16600
+ }[];
16601
+ folders: {
16602
+ id: string;
16603
+ name: string;
16604
+ fileCount: number;
16605
+ createTime: number;
16606
+ creatorId: string;
16607
+ creatorName: string;
16608
+ }[];
16609
+ }>;
16610
+ /**
16611
+ * 获取 Cookies
16612
+ * @param domain The domain to get cookies from
16613
+ */
16614
+ getCookies(domain: string): Promise<{
16615
+ cookie: string;
16616
+ cookies: string;
16617
+ }>;
16618
+ /**
16619
+ * 获取 QQ 相关接口凭证
16620
+ * @param domain The domain to get credentials from
16621
+ */
16622
+ getCredentials(domain: string): Promise<{
16623
+ cookies: string;
16624
+ csrf_token: number;
16625
+ }>;
16626
+ /**
16627
+ * 获取 CSRF Token
16628
+ */
16629
+ getCSRFToken(): Promise<{
16630
+ token: number;
16631
+ }>;
16632
+ /**
16633
+ * 设置头像
16634
+ * @param file base64:// file:// http(s)://
16635
+ * @returns 是否设置成功
16636
+ */
16637
+ setAvatar(file: string): Promise<boolean>;
16638
+ /**
16639
+ * 获取群 Ai 语音可用声色列表
16640
+ * @returns 声色列表
16641
+ */
16642
+ getAiCharacters(): Promise<{
16643
+ character_id: string;
16644
+ character_name: string;
16645
+ preview_url: string;
16646
+ }[]>;
16647
+ /**
16648
+ * 设置群 Ai 语音声色
16649
+ * @param groupId 群号
16650
+ * @param character 声色ID
16651
+ * @param text 转换的文本
16652
+ */
16653
+ sendAiCharacter(groupId: string, character: string, text: string): Promise<{
16654
+ messageId: string;
16655
+ }>;
16656
+ /**
16657
+ * 获取 rkey
16658
+ * @returns rkey
16659
+ */
16660
+ getRkey(): Promise<{
16661
+ type: "private" | "group";
16662
+ rkey: string;
16663
+ created_at: number;
16664
+ ttl: number;
16665
+ }[]>;
16503
16666
  }
16504
16667
 
16505
16668
  /** OneBot适配器缓存Map */
@@ -17355,4 +17518,4 @@ type Client = RedisClientType & {
17355
17518
  */
17356
17519
  declare const start: () => Promise<void>;
17357
17520
 
17358
- export { type Accept, type AccordionItemProps, type AccordionKV, type AccordionProProps, type AccordionProResult, type AccordionProps, type AccordionResult, type AccountInfo, type Adapter, AdapterBase, type AdapterCommunication, AdapterConvertKarin, type AdapterInfo, AdapterOneBot, type AdapterOptions, type AdapterPlatform, type AdapterProtocol, type AdapterStandard, type AdapterType, type Adapters, type AddDependenciesParams, type AddTaskResult, type AfterForwardMessageCallback, type AfterMessageCallback, type AllPluginMethods, type Apps, type ArrayField, type AtElement, type Author, BASE_ROUTER, BATCH_UPDATE_PLUGINS_ROUTER, type BaseContact, BaseEvent, type BaseEventOptions, type BaseEventType, type BaseForwardCallback, type BaseMessageCallback, type BasketballElement, Bot, type BoundingBox, type BubbleFaceElement, type Button, type ButtonElement, CHECK_PLUGIN_ROUTER, CLOSE_TERMINAL_ROUTER, CONSOLE_ROUTER, CREATE_TERMINAL_ROUTER, type Cache, type CacheEntry, type CheckboxField, type CheckboxGroupProps, type CheckboxProps, type CheckboxResult, type Children, type CmdFnc, type Command, type CommandClass, type ComponentConfig, type ComponentProps, type ComponentType, type Components, type ComponentsClass, type Config, type Contact, type ContactElement, type Count, type CreateGroupFolderResponse, type CreatePty, type CreateTask, type CreateTaskParams, type CreateTaskResult, type CronProps, type CustomMusicElement, type CustomNodeElement, type DbStreamStatus, type DbStreams, type DefineConfig, type DependenciesManage, type DependenciesManageBase, type Dependency, type DiceElement, type DirectContact, DirectMessage, type DirectMessageOptions, type DirectNodeElement, type DirectSender, type DividerField, type DividerProps, type DownloadFileErrorResult, type DownloadFileOptions, type DownloadFileResponse, type DownloadFileResult, type DownloadFileSuccessResult, type DownloadFilesOptions, EVENT_COUNT, EXIT_ROUTER, type ElementTypes, type Elements, type Env, type Event, type EventCallCallback, type EventCallHookItem, type EventParent, type EventToSubEvent, type ExecOptions$1 as ExecOptions, type ExecReturn, type ExecType, type ExtendedAxiosRequestConfig, FILE_CHANGE, type FaceElement, type FieldType, type FileElement, type FileList, type FileListMap, type FileToUrlHandler, type FileToUrlResult, type FormField, type ForwardMessageCallback, type ForwardOptions, type FriendContact, type FriendData, FriendDecreaseNotice, type FriendDecreaseOptions, FriendIncreaseNotice, type FriendIncreaseOptions, FriendMessage, type FriendMessageOptions, type FriendNoticeEventMap, type FriendRequestEventMap, type FriendRequestOptions, type FriendSender, type FrontendInstalledPluginListResponse, GET_BOTS_ROUTER, GET_CONFIG_ROUTER, GET_DEPENDENCIES_LIST_ROUTER, GET_LOADED_COMMAND_PLUGIN_CACHE_LIST_ROUTER, GET_LOCAL_PLUGIN_FRONTEND_LIST_ROUTER, GET_LOCAL_PLUGIN_LIST_ROUTER, GET_LOG_FILE_LIST_ROUTER, GET_LOG_FILE_ROUTER, GET_LOG_ROUTER, GET_NETWORK_STATUS_ROUTER, GET_NPMRC_LIST_ROUTER, GET_NPM_BASE_CONFIG_ROUTER, GET_NPM_CONFIG_ROUTER, GET_ONLINE_PLUGIN_LIST_ROUTER, GET_PLUGIN_APPS_ROUTER, GET_PLUGIN_CONFIG_ROUTER, GET_PLUGIN_FILE_ROUTER, GET_PLUGIN_LIST_PLUGIN_ADMIN_ROUTER, GET_PLUGIN_LIST_ROUTER, GET_PLUGIN_MARKET_LIST_ROUTER, GET_TASK_LIST_ROUTER, GET_TASK_STATUS_ROUTER, GET_TERMINAL_LIST_ROUTER, GET_UPDATABLE_PLUGINS_ROUTER, GET_WEBUI_PLUGIN_LIST_ROUTER, GET_WEBUI_PLUGIN_VERSIONS_ROUTER, type GeneralHookCallback, type GeneralHookItem, type GetAtAllCountResponse, type GetBot, type GetCommitHashOptions, type GetConfigRequest, type GetConfigResponse, type GetGroupFileListResponse, type GetGroupFileSystemInfoResponse, type GetGroupHighlightsResponse, type GetGroupMuteListResponse, type GetPluginLocalOptions, type GetPluginLocalReturn, type GetPluginReturn, type GetPluginType, type GiftElement, type GitLocalBranches, type GitPullOptions, type GitPullResult, type GitRemoteBranches, type GithubConfig, type GoToOptions, GroupAdminChangedNotice, type GroupAdminChangedOptions, GroupApplyRequest, type GroupApplyRequestOptions, GroupCardChangedNotice, type GroupCardChangedOptions, type GroupContact, type GroupData, GroupFileUploadedNotice, type GroupFileUploadedOptions, GroupHlightsChangedNotice, type GroupHlightsChangedOptions, GroupHonorChangedNotice, type GroupHonorChangedOptions, type GroupInfo, GroupInviteRequest, type GroupInviteRequestOptions, GroupLuckKingNotice, type GroupLuckKingOptions, GroupMemberBanNotice, type GroupMemberBanOptions, type GroupMemberData, GroupMemberDecreaseNotice, type GroupMemberDecreaseOptions, GroupMemberIncreaseNotice, type GroupMemberIncreaseOptions, type GroupMemberInfo, GroupMemberTitleUpdatedNotice, type GroupMemberUniqueTitleChangedOptions, GroupMessage, type GroupMessageOptions, GroupMessageReactionNotice, type GroupMessageReactionOptions, GroupNotice, type GroupNoticeEventMap, GroupPokeNotice, type GroupPokeOptions, GroupRecallNotice, type GroupRecallOptions, type GroupRequestEventMap, type GroupSender, GroupSignInNotice, type GroupSignInOptions, type GroupTempContact, GroupTempMessage, type GroupTempMessageOptions, type GroupTempSender, GroupWholeBanNotice, type GroupWholeBanOptions, type Groups, type GroupsObjectValue, type GuildContact, GuildMessage, type GuildMessageOptions, type GuildSender, HTTPStatusCode, type Handler, type HandlerType, type HookCache, type HookCallback, type HookEmitForward, type HookEmitMessage, type HookNext, type HookOptions, type HooksType, INSTALL_PLUGIN_ROUTER, INSTALL_WEBUI_PLUGIN_ROUTER, IS_PLUGIN_CONFIG_EXIST_ROUTER, type Icon, type ImageElement, type ImportModuleResult, type InputGroupProps, type InputProps, type InputResult, type JsonElement, type JwtVerifyBase, type JwtVerifyError, type JwtVerifyExpired, type JwtVerifyResult, type JwtVerifySuccess, type JwtVerifyUnauthorized, type KarinButton, KarinConvertAdapter, type KarinPluginAppsType, type KeyboardElement, LOGIN_ROUTER, type LoadPluginResult, type LoadedPluginCacheList, type LocalApiResponse, type LocationElement, type Log, LogMethodNames, Logger, LoggerLevel, type LongMsgElement, MANAGE_DEPENDENCIES_ROUTER, type MarkdownElement, type MarkdownTplElement, type MarketFaceElement, type Message$2 as Message, MessageBase$1 as MessageBase, type MessageEventMap, type MessageEventSub, type MessageHookItem, type MessageOptions, type MessageResponse, type MusicElement, type MusicPlatform, type NetworkStatus, type NodeElement, type NormalMessageCallback, type Notice, type NoticeAndRequest, NoticeBase, type NoticeEventMap, type NoticeEventSub, type NoticeOptions, type NpmBaseConfigResponse, type NpmRegistryResponse, type NpmrcFileResponse, type NumberField, type ObjectArrayField, type ObjectField, createMessage as OneBotCreateMessage, createNotice as OneBotCreateNotice, createRequest as OneBotCreateRequest, type Option, type Options, PING_ROUTER, PLUGIN_ADMIN_ROUTER, type PM2, type Package, type Parser, type PasmsgElement, type Permission, type PingRequestResult, type PkgData, type PkgEnv, type PkgInfo, Plugin$1 as Plugin, type PluginAdminCustomInstall, type PluginAdminCustomInstallApp, type PluginAdminInstall, type PluginAdminListResponse, type PluginAdminMarketInstall, type PluginAdminMarketInstallApp, type PluginAdminParams, type PluginAdminResult, type PluginAdminUninstall, type PluginAdminUpdate, type PluginFile, type PluginFncTypes, type PluginLists, type PluginMarketAuthor, type PluginMarketLocalBase, type PluginMarketLocalOptions, type PluginMarketOptions, type PluginMarketRequest, type PluginMarketResponse, type PluginOptions, type PluginRule, type PluginUpdateInfo, type PnpmDependencies, type PnpmDependency, type Point, PrivateApplyRequest, type PrivateApplyRequestOptions, PrivateFileUploadedNotice, type PrivateFileUploadedOptions, PrivatePokeNotice, type PrivatePokeOptions, PrivateRecallNotice, type PrivateRecallOptions, type Privates, type PrivatesObjectValue, type PuppeteerLifeCycleEvent, type QQBotButton, type QQButtonTextType, type QQGroupFileInfo, type QQGroupFolderInfo, type QQGroupHonorInfo, RECV_MSG, REFRESH_ROUTER, RESTART_ROUTER, type RaceResult, type Radio, type RadioField, type RadioGroupProps, type RadioResult, type RawElement, type ReadyMusicElement, ReceiveLikeNotice, type ReceiveLikeOptions, type RecordElement, type Redis, type RemoveDependenciesParams, type Render, type RenderResult, Renderer, type Renders$1 as Renders, type Reply, type ReplyElement, type Request, RequestBase, type RequestEventMap, type RequestEventSub, type RequestOptions, type RequireFunction, type RequireFunctionSync, type RequireOptions, type Role, type RpsElement, SAVE_CONFIG_ROUTER, SAVE_NPMRC_ROUTER, SAVE_PLUGIN_CONFIG_ROUTER, SEND_MSG, SET_LOG_LEVEL_ROUTER, SYSTEM_INFO_ROUTER, SYSTEM_STATUS_KARIN_ROUTER, SYSTEM_STATUS_ROUTER, SYSTEM_STATUS_WS_ROUTER, type SandBoxAccountInfo, type SandboxMsgRecord, type SandboxSendApi, type SandboxSendSendFriendMsg, type SandboxSendSendGroupMsg, type SandboxSendSendMsg, type SaveConfigResponse, type SaveResult, type Scene, type ScreenshotClip, type ScreenshotOptions, type SectionField, type SelectField, type SendElement, type SendForwardMessageResponse, type SendMessage, type SendMsgHookItem, type SendMsgResults, type Sender, type SenderBase, type SenderGroup$1 as SenderGroup, type Sex$1 as Sex, type ShareElement, type Snapka, type SnapkaResult, type SrcReply, type StandardResult, type SwitchField, type SwitchProps, type SwitchResult, TASK_DELETE_ROUTER, TASK_LIST_ROUTER, TASK_LOGS_ROUTER, TASK_RUN_ROUTER, type Task, type TaskCallbacks, type TaskEntity, type TaskExecutor, type TaskFilter, type TaskStatus, type TaskType, type TerminalInstance, type TerminalShell, type TestNetworkRequestDetail, type TextElement, type TextField, type TitleField, UNINSTALL_PLUGIN_ROUTER, UNINSTALL_WEBUI_PLUGIN_ROUTER, UPDATE_CORE_ROUTER, UPDATE_PLUGIN_ROUTER, UPDATE_TASK_STATUS_ROUTER, UPDATE_WEBUI_PLUGIN_VERSION_ROUTER, type UnionMessage, type UnregisterBot, type UpgradeDependenciesParams, type UserInfo, type ValidationRule, type ValueType, type VideoElement, WS_CLOSE, WS_CLOSE_ONEBOT, WS_CLOSE_PUPPETEER, WS_CLOSE_SANDBOX, WS_CONNECTION, WS_CONNECTION_ONEBOT, WS_CONNECTION_PUPPETEER, WS_CONNECTION_SANDBOX, WS_CONNECTION_TERMINAL, WS_SNAPKA, type WaitForOptions, Watch, Watcher, type WeatherElement, type XmlElement, type YamlComment, YamlEditor, type YamlValue, absPath, accordion, accordionItem, accordionPro, app, applyComments, authMiddleware, base64, buffer, buildError, buildGithub, buttonHandle, cacheMap, callRender, changelog, checkGitPluginUpdate, checkPkgUpdate, checkPort, clearRequire, clearRequireFile, comment, index$1 as common, components, index as config, contact$1 as contact, contactDirect, contactFriend, contactGroup, contactGroupTemp, contactGuild, convertOneBotMessageToKarin, copyConfig, copyConfigSync, copyFiles, copyFilesSync, createAccessTokenExpiredResponse, createBadRequestResponse, createDirectMessage, createForbiddenResponse, createFriendDecreaseNotice, createFriendIncreaseNotice, createFriendMessage, createGroupAdminChangedNotice, createGroupApplyRequest, createGroupCardChangedNotice, createGroupFileUploadedNotice, createGroupHlightsChangedNotice, createGroupHonorChangedNotice, createGroupInviteRequest, createGroupLuckKingNotice, createGroupMemberAddNotice, createGroupMemberBanNotice, createGroupMemberDelNotice, createGroupMemberTitleUpdatedNotice, createGroupMessage, createGroupMessageReactionNotice, createGroupPokeNotice, createGroupRecallNotice, createGroupSignInNotice, createGroupTempMessage, createGroupWholeBanNotice, createGuildMessage, createINIParser, createMethodNotAllowedResponse, createNotFoundResponse, createOneBotClient, createOneBotHttp, createOneBotWsServer, createPayloadTooLargeResponse, createPluginDir, createPrivateApplyRequest, createPrivateFileUploadedNotice, createPrivatePokeNotice, createPrivateRecallNotice, createRawMessage, createReceiveLikeNotice, createRefreshTokenExpiredResponse, createResponse, createServerErrorResponse, createSuccessResponse, createTaskDatabase, createUnauthorizedResponse, cron, db, debug, karin as default, defineConfig, disconnectAllOneBotServer, divider, downFile, downloadFile, errorToString, exec, executeTask, existToMkdir, existToMkdirSync, exists, existsSync, ffmpeg, ffplay, ffprobe, fs as file, fileToBase64, fileToUrl, fileToUrlHandlerKey, filesByExt, formatLogString, formatPath, formatTime$1 as formatTime, index$3 as fs, getAllBot, getAllBotID, getAllBotList, getAllFiles, getAllFilesSync, getBot, getBotCount, getCommit, getDefaultBranch, getFastGithub, getFastRegistry, getFileMessage, getFiles, getHash, getLocalBranches, getLocalCommitHash, getMimeType, getPackageJson, getPid, getPkgVersion, getPluginInfo, getPlugins, getRelPath, getRemoteBranches, getRemoteCommitHash, getRemotePkgVersion, getRender, getRenderCount, getRenderList, getRequestIp, getTaskCallback, getTaskDatabase, getTime, gitPull, handler$1 as handler, hooks, importModule, imports, ini, initOneBotAdapter, initTaskSystem, input, isClass, isDir, isDirSync, isDocker, isFile, isFileSync, isIPv4Loop, isIPv6Loop, isLinux, isLocalRequest, isLoopback, isMac, isPathEqual, isPlugin, isPublic, isRoot, isSubPath, isWin, json$1 as json, karin, karinToQQBot, key, killApp, lock, lockMethod, lockProp, log, logger, logs, makeForward, makeMessage, type messageType, mkdir, mkdirSync, parseChangelog, parseGithubUrl, pingRequest, pkgRoot, qqbotToKarin, raceRequest, randomStr, range, read, readFile, readJson, readJsonSync, redis, registerBot, registerRender, removeTaskCallback, render, renderHtml, renderMultiHtml, renderTpl, requireFile, requireFileSync, restart, restartDirect, rmSync, router, satisfies, save, type screenshot, segment, sendMsg$1 as sendMsg, sender, senderDirect, senderFriend, senderGroup, senderGroupTemp, senderGuild, sep, server, setTaskCallback, setTaskDatabase, splitPath, start, stream, stringifyError, switchComponent, index$2 as system, taskAdd, taskExists, taskGet, taskList, taskSystem, taskUpdateLogs, taskUpdateStatus, unregisterBot, unregisterRender, updateAllGitPlugin, updateAllPkg, updateGitPlugin, updatePkg, updateTaskLogs, updateTaskStatus, uptime$1 as uptime, urlToPath, waitPort, watch, watchAndMerge, write, writeJson, writeJsonSync, yaml };
17521
+ export { type Accept, type AccordionItemProps, type AccordionKV, type AccordionProProps, type AccordionProResult, type AccordionProps, type AccordionResult, type AccountInfo, type Adapter, AdapterBase, type AdapterCommunication, AdapterConvertKarin, type AdapterInfo, AdapterOneBot, type AdapterOptions, type AdapterPlatform, type AdapterProtocol, type AdapterStandard, type AdapterType, type Adapters, type AddDependenciesParams, type AddTaskResult, type AfterForwardMessageCallback, type AfterMessageCallback, type AllPluginMethods, type Apps, type ArrayField, type AtElement, type Author, BASE_ROUTER, BATCH_UPDATE_PLUGINS_ROUTER, type BaseContact, BaseEvent, type BaseEventOptions, type BaseEventType, type BaseForwardCallback, type BaseMessageCallback, type BasketballElement, Bot, type BoundingBox, type BubbleFaceElement, type Button, type ButtonElement, CHECK_PLUGIN_ROUTER, CLOSE_TERMINAL_ROUTER, CONSOLE_ROUTER, CREATE_TERMINAL_ROUTER, type Cache, type CacheEntry, type CheckboxField, type CheckboxGroupProps, type CheckboxProps, type CheckboxResult, type Children, type CmdFnc, type Command, type CommandClass, type ComponentConfig, type ComponentProps, type ComponentType, type Components, type ComponentsClass, type Config, type Contact, type ContactElement, type Count, type CreateGroupFolderResponse, type CreatePty, type CreateTask, type CreateTaskParams, type CreateTaskResult, type CronProps, type CustomMusicElement, type CustomNodeElement, type DbStreamStatus, type DbStreams, type DefineConfig, type DependenciesManage, type DependenciesManageBase, type Dependency, type DiceElement, type DirectContact, DirectMessage, type DirectMessageOptions, type DirectNodeElement, type DirectSender, type DividerField, type DividerProps, type DownloadFileErrorResult, type DownloadFileOptions, type DownloadFileResponse, type DownloadFileResult, type DownloadFileSuccessResult, type DownloadFilesOptions, EVENT_COUNT, EXIT_ROUTER, type ElementTypes, type Elements, type Env, type Event, type EventCallCallback, type EventCallHookItem, type EventParent, type EventToSubEvent, type ExecOptions$1 as ExecOptions, type ExecReturn, type ExecType, type ExtendedAxiosRequestConfig, FILE_CHANGE, type FaceElement, type FieldType, type FileElement, type FileList, type FileListMap, type FileToUrlHandler, type FileToUrlResult, type FormField, type ForwardMessageCallback, type ForwardOptions, type FriendContact, type FriendData, FriendDecreaseNotice, type FriendDecreaseOptions, FriendIncreaseNotice, type FriendIncreaseOptions, FriendMessage, type FriendMessageOptions, type FriendNoticeEventMap, type FriendRequestEventMap, type FriendRequestOptions, type FriendSender, type FrontendInstalledPluginListResponse, GET_BOTS_ROUTER, GET_CONFIG_ROUTER, GET_DEPENDENCIES_LIST_ROUTER, GET_LOADED_COMMAND_PLUGIN_CACHE_LIST_ROUTER, GET_LOCAL_PLUGIN_FRONTEND_LIST_ROUTER, GET_LOCAL_PLUGIN_LIST_ROUTER, GET_LOG_FILE_LIST_ROUTER, GET_LOG_FILE_ROUTER, GET_LOG_ROUTER, GET_NETWORK_STATUS_ROUTER, GET_NPMRC_LIST_ROUTER, GET_NPM_BASE_CONFIG_ROUTER, GET_NPM_CONFIG_ROUTER, GET_ONLINE_PLUGIN_LIST_ROUTER, GET_PLUGIN_APPS_ROUTER, GET_PLUGIN_CONFIG_ROUTER, GET_PLUGIN_FILE_ROUTER, GET_PLUGIN_LIST_PLUGIN_ADMIN_ROUTER, GET_PLUGIN_LIST_ROUTER, GET_PLUGIN_MARKET_LIST_ROUTER, GET_TASK_LIST_ROUTER, GET_TASK_STATUS_ROUTER, GET_TERMINAL_LIST_ROUTER, GET_UPDATABLE_PLUGINS_ROUTER, GET_WEBUI_PLUGIN_LIST_ROUTER, GET_WEBUI_PLUGIN_VERSIONS_ROUTER, type GeneralHookCallback, type GeneralHookItem, type GetAiCharactersResponse, type GetAtAllCountResponse, type GetBot, type GetCommitHashOptions, type GetConfigRequest, type GetConfigResponse, type GetGroupFileListResponse, type GetGroupFileSystemInfoResponse, type GetGroupHighlightsResponse, type GetGroupMuteListResponse, type GetPluginLocalOptions, type GetPluginLocalReturn, type GetPluginReturn, type GetPluginType, type GetRkeyResponse, type GiftElement, type GitLocalBranches, type GitPullOptions, type GitPullResult, type GitRemoteBranches, type GithubConfig, type GoToOptions, GroupAdminChangedNotice, type GroupAdminChangedOptions, GroupApplyRequest, type GroupApplyRequestOptions, GroupCardChangedNotice, type GroupCardChangedOptions, type GroupContact, type GroupData, GroupFileUploadedNotice, type GroupFileUploadedOptions, GroupHlightsChangedNotice, type GroupHlightsChangedOptions, GroupHonorChangedNotice, type GroupHonorChangedOptions, type GroupInfo, GroupInviteRequest, type GroupInviteRequestOptions, GroupLuckKingNotice, type GroupLuckKingOptions, GroupMemberBanNotice, type GroupMemberBanOptions, type GroupMemberData, GroupMemberDecreaseNotice, type GroupMemberDecreaseOptions, GroupMemberIncreaseNotice, type GroupMemberIncreaseOptions, type GroupMemberInfo, GroupMemberTitleUpdatedNotice, type GroupMemberUniqueTitleChangedOptions, GroupMessage, type GroupMessageOptions, GroupMessageReactionNotice, type GroupMessageReactionOptions, GroupNotice, type GroupNoticeEventMap, GroupPokeNotice, type GroupPokeOptions, GroupRecallNotice, type GroupRecallOptions, type GroupRequestEventMap, type GroupSender, GroupSignInNotice, type GroupSignInOptions, type GroupTempContact, GroupTempMessage, type GroupTempMessageOptions, type GroupTempSender, GroupWholeBanNotice, type GroupWholeBanOptions, type Groups, type GroupsObjectValue, type GuildContact, GuildMessage, type GuildMessageOptions, type GuildSender, HTTPStatusCode, type Handler, type HandlerType, type HookCache, type HookCallback, type HookEmitForward, type HookEmitMessage, type HookNext, type HookOptions, type HooksType, INSTALL_PLUGIN_ROUTER, INSTALL_WEBUI_PLUGIN_ROUTER, IS_PLUGIN_CONFIG_EXIST_ROUTER, type Icon, type ImageElement, type ImportModuleResult, type InputGroupProps, type InputProps, type InputResult, type JsonElement, type JwtVerifyBase, type JwtVerifyError, type JwtVerifyExpired, type JwtVerifyResult, type JwtVerifySuccess, type JwtVerifyUnauthorized, type KarinButton, KarinConvertAdapter, type KarinPluginAppsType, type KeyboardElement, LOGIN_ROUTER, type LoadPluginResult, type LoadedPluginCacheList, type LocalApiResponse, type LocationElement, type Log, LogMethodNames, Logger, LoggerLevel, type LongMsgElement, MANAGE_DEPENDENCIES_ROUTER, type MarkdownElement, type MarkdownTplElement, type MarketFaceElement, type Message$2 as Message, MessageBase$1 as MessageBase, type MessageEventMap, type MessageEventSub, type MessageHookItem, type MessageOptions, type MessageResponse, type MusicElement, type MusicPlatform, type NetworkStatus, type NodeElement, type NormalMessageCallback, type Notice, type NoticeAndRequest, NoticeBase, type NoticeEventMap, type NoticeEventSub, type NoticeOptions, type NpmBaseConfigResponse, type NpmRegistryResponse, type NpmrcFileResponse, type NumberField, type ObjectArrayField, type ObjectField, createMessage as OneBotCreateMessage, createNotice as OneBotCreateNotice, createRequest as OneBotCreateRequest, type Option, type Options, PING_ROUTER, PLUGIN_ADMIN_ROUTER, type PM2, type Package, type Parser, type PasmsgElement, type Permission, type PingRequestResult, type PkgData, type PkgEnv, type PkgInfo, Plugin$1 as Plugin, type PluginAdminCustomInstall, type PluginAdminCustomInstallApp, type PluginAdminInstall, type PluginAdminListResponse, type PluginAdminMarketInstall, type PluginAdminMarketInstallApp, type PluginAdminParams, type PluginAdminResult, type PluginAdminUninstall, type PluginAdminUpdate, type PluginFile, type PluginFncTypes, type PluginLists, type PluginMarketAuthor, type PluginMarketLocalBase, type PluginMarketLocalOptions, type PluginMarketOptions, type PluginMarketRequest, type PluginMarketResponse, type PluginOptions, type PluginRule, type PluginUpdateInfo, type PnpmDependencies, type PnpmDependency, type Point, PrivateApplyRequest, type PrivateApplyRequestOptions, PrivateFileUploadedNotice, type PrivateFileUploadedOptions, PrivatePokeNotice, type PrivatePokeOptions, PrivateRecallNotice, type PrivateRecallOptions, type Privates, type PrivatesObjectValue, type PuppeteerLifeCycleEvent, type QQBotButton, type QQButtonTextType, type QQGroupFileInfo, type QQGroupFolderInfo, type QQGroupHonorInfo, RECV_MSG, REFRESH_ROUTER, RESTART_ROUTER, type RaceResult, type Radio, type RadioField, type RadioGroupProps, type RadioResult, type RawElement, type ReadyMusicElement, ReceiveLikeNotice, type ReceiveLikeOptions, type RecordElement, type Redis, type RemoveDependenciesParams, type Render, type RenderResult, Renderer, type Renders$1 as Renders, type Reply, type ReplyElement, type Request, RequestBase, type RequestEventMap, type RequestEventSub, type RequestOptions, type RequireFunction, type RequireFunctionSync, type RequireOptions, type Role, type RpsElement, SAVE_CONFIG_ROUTER, SAVE_NPMRC_ROUTER, SAVE_PLUGIN_CONFIG_ROUTER, SEND_MSG, SET_LOG_LEVEL_ROUTER, SYSTEM_INFO_ROUTER, SYSTEM_STATUS_KARIN_ROUTER, SYSTEM_STATUS_ROUTER, SYSTEM_STATUS_WS_ROUTER, type SandBoxAccountInfo, type SandboxMsgRecord, type SandboxSendApi, type SandboxSendSendFriendMsg, type SandboxSendSendGroupMsg, type SandboxSendSendMsg, type SaveConfigResponse, type SaveResult, type Scene, type ScreenshotClip, type ScreenshotOptions, type SectionField, type SelectField, type SendElement, type SendForwardMessageResponse, type SendMessage, type SendMsgHookItem, type SendMsgResults, type Sender, type SenderBase, type SenderGroup$1 as SenderGroup, type Sex$1 as Sex, type ShareElement, type Snapka, type SnapkaResult, type SrcReply, type StandardResult, type SwitchField, type SwitchProps, type SwitchResult, TASK_DELETE_ROUTER, TASK_LIST_ROUTER, TASK_LOGS_ROUTER, TASK_RUN_ROUTER, type Task, type TaskCallbacks, type TaskEntity, type TaskExecutor, type TaskFilter, type TaskStatus, type TaskType, type TerminalInstance, type TerminalShell, type TestNetworkRequestDetail, type TextElement, type TextField, type TitleField, UNINSTALL_PLUGIN_ROUTER, UNINSTALL_WEBUI_PLUGIN_ROUTER, UPDATE_CORE_ROUTER, UPDATE_PLUGIN_ROUTER, UPDATE_TASK_STATUS_ROUTER, UPDATE_WEBUI_PLUGIN_VERSION_ROUTER, type UnionMessage, type UnregisterBot, type UpgradeDependenciesParams, type UserInfo, type ValidationRule, type ValueType, type VideoElement, WS_CLOSE, WS_CLOSE_ONEBOT, WS_CLOSE_PUPPETEER, WS_CLOSE_SANDBOX, WS_CONNECTION, WS_CONNECTION_ONEBOT, WS_CONNECTION_PUPPETEER, WS_CONNECTION_SANDBOX, WS_CONNECTION_TERMINAL, WS_SNAPKA, type WaitForOptions, Watch, Watcher, type WeatherElement, type XmlElement, type YamlComment, YamlEditor, type YamlValue, absPath, accordion, accordionItem, accordionPro, app, applyComments, authMiddleware, base64, buffer, buildError, buildGithub, buttonHandle, cacheMap, callRender, changelog, checkGitPluginUpdate, checkPkgUpdate, checkPort, clearRequire, clearRequireFile, comment, index$1 as common, components, index as config, contact$1 as contact, contactDirect, contactFriend, contactGroup, contactGroupTemp, contactGuild, convertOneBotMessageToKarin, copyConfig, copyConfigSync, copyFiles, copyFilesSync, createAccessTokenExpiredResponse, createBadRequestResponse, createDirectMessage, createForbiddenResponse, createFriendDecreaseNotice, createFriendIncreaseNotice, createFriendMessage, createGroupAdminChangedNotice, createGroupApplyRequest, createGroupCardChangedNotice, createGroupFileUploadedNotice, createGroupHlightsChangedNotice, createGroupHonorChangedNotice, createGroupInviteRequest, createGroupLuckKingNotice, createGroupMemberAddNotice, createGroupMemberBanNotice, createGroupMemberDelNotice, createGroupMemberTitleUpdatedNotice, createGroupMessage, createGroupMessageReactionNotice, createGroupPokeNotice, createGroupRecallNotice, createGroupSignInNotice, createGroupTempMessage, createGroupWholeBanNotice, createGuildMessage, createINIParser, createMethodNotAllowedResponse, createNotFoundResponse, createOneBotClient, createOneBotHttp, createOneBotWsServer, createPayloadTooLargeResponse, createPluginDir, createPrivateApplyRequest, createPrivateFileUploadedNotice, createPrivatePokeNotice, createPrivateRecallNotice, createRawMessage, createReceiveLikeNotice, createRefreshTokenExpiredResponse, createResponse, createServerErrorResponse, createSuccessResponse, createTaskDatabase, createUnauthorizedResponse, cron, db, debug, karin as default, defineConfig, disconnectAllOneBotServer, divider, downFile, downloadFile, errorToString, exec, executeTask, existToMkdir, existToMkdirSync, exists, existsSync, ffmpeg, ffplay, ffprobe, fs as file, fileToBase64, fileToUrl, fileToUrlHandlerKey, filesByExt, formatLogString, formatPath, formatTime$1 as formatTime, index$3 as fs, getAllBot, getAllBotID, getAllBotList, getAllFiles, getAllFilesSync, getBot, getBotCount, getCommit, getDefaultBranch, getFastGithub, getFastRegistry, getFileMessage, getFiles, getHash, getLocalBranches, getLocalCommitHash, getMimeType, getPackageJson, getPid, getPkgVersion, getPluginInfo, getPlugins, getRelPath, getRemoteBranches, getRemoteCommitHash, getRemotePkgVersion, getRender, getRenderCount, getRenderList, getRequestIp, getTaskCallback, getTaskDatabase, getTime, gitPull, handler$1 as handler, hooks, importModule, imports, ini, initOneBotAdapter, initTaskSystem, input, isClass, isDir, isDirSync, isDocker, isFile, isFileSync, isIPv4Loop, isIPv6Loop, isLinux, isLocalRequest, isLoopback, isMac, isPathEqual, isPlugin, isPublic, isRoot, isSubPath, isWin, json$1 as json, karin, karinToQQBot, key, killApp, lock, lockMethod, lockProp, log, logger, logs, makeForward, makeMessage, type messageType, mkdir, mkdirSync, parseChangelog, parseGithubUrl, pingRequest, pkgRoot, qqbotToKarin, raceRequest, randomStr, range, read, readFile, readJson, readJsonSync, redis, registerBot, registerRender, removeTaskCallback, render, renderHtml, renderMultiHtml, renderTpl, requireFile, requireFileSync, restart, restartDirect, rmSync, router, satisfies, save, type screenshot, segment, sendMsg$1 as sendMsg, sender, senderDirect, senderFriend, senderGroup, senderGroupTemp, senderGuild, sep, server, setTaskCallback, setTaskDatabase, splitPath, start, stream, stringifyError, switchComponent, index$2 as system, taskAdd, taskExists, taskGet, taskList, taskSystem, taskUpdateLogs, taskUpdateStatus, unregisterBot, unregisterRender, updateAllGitPlugin, updateAllPkg, updateGitPlugin, updatePkg, updateTaskLogs, updateTaskStatus, uptime$1 as uptime, urlToPath, waitPort, watch, watchAndMerge, write, writeJson, writeJsonSync, yaml };
package/dist/index.mjs CHANGED
@@ -2925,18 +2925,40 @@ var init_base = __esm({
2925
2925
  }
2926
2926
  /**
2927
2927
  * 获取 CSRF Token
2928
- * @param _domain The domain to get the CSRF token from
2929
2928
  */
2930
- getCSRFToken(_domain) {
2929
+ getCSRFToken() {
2931
2930
  throw new Error(this.#errMsg);
2932
2931
  }
2933
2932
  /**
2934
- * 获取 HTTP Cookies
2935
- * @param _appid The appid
2936
- * @param _daid The daid
2937
- * @param _jumpUrl The jump url
2933
+ * 设置头像
2934
+ * @param file base64:// file:// http(s)://
2935
+ * @returns 是否设置成功
2938
2936
  */
2939
- getHttpCookies(_appid, _daid, _jumpUrl) {
2937
+ setAvatar(_file) {
2938
+ throw new Error(this.#errMsg);
2939
+ }
2940
+ /**
2941
+ * 获取 rkey
2942
+ * @returns rkey
2943
+ */
2944
+ getRkey() {
2945
+ throw new Error(this.#errMsg);
2946
+ }
2947
+ /**
2948
+ * 获取群 Ai 语音可用声色列表
2949
+ * @returns 声色列表
2950
+ */
2951
+ getAiCharacters() {
2952
+ throw new Error(this.#errMsg);
2953
+ }
2954
+ /**
2955
+ * 设置群 Ai 语音声色
2956
+ * @param _groupId 群号
2957
+ * @param _characterId 声色ID
2958
+ * @param _text 文本
2959
+ * @returns 是否设置成功
2960
+ */
2961
+ sendAiCharacter(_groupId, _characterId, _text) {
2940
2962
  throw new Error(this.#errMsg);
2941
2963
  }
2942
2964
  };
@@ -18767,6 +18789,116 @@ var init_core = __esm({
18767
18789
  }
18768
18790
  throw TypeError(`\u4E0D\u652F\u6301\u7684\u573A\u666F\u7C7B\u578B: ${contact3.scene}`);
18769
18791
  }
18792
+ /**
18793
+ * 获取群文件系统信息
18794
+ * @param groupId 群ID
18795
+ * @returns 群文件系统信息
18796
+ */
18797
+ async getGroupFileSystemInfo(groupId) {
18798
+ const result = await this._onebot.getGroupFileSystemInfo(+groupId);
18799
+ return {
18800
+ ...result,
18801
+ fileCount: result.file_count,
18802
+ limitCount: result.limit_count,
18803
+ usedSpace: result.used_space,
18804
+ totalSpace: result.total_space
18805
+ };
18806
+ }
18807
+ /**
18808
+ * 获取群文件列表
18809
+ * @param groupId 群ID
18810
+ * @param folderId 文件夹ID
18811
+ * @returns 群文件列表
18812
+ */
18813
+ async getGroupFileList(groupId, folderId) {
18814
+ const result = typeof folderId !== "string" ? await this._onebot.getGroupRootFiles(+groupId) : await this._onebot.getGroupFilesByFolder(+groupId, folderId);
18815
+ return {
18816
+ files: result.files.map((v) => ({
18817
+ fid: v.file_id,
18818
+ name: v.file_name,
18819
+ size: v.file_size,
18820
+ uploadTime: v.upload_time,
18821
+ expireTime: v.dead_time,
18822
+ modifyTime: v.modify_time,
18823
+ downloadCount: v.download_times,
18824
+ uploadId: v.uploader + "",
18825
+ uploadName: v.uploader_name,
18826
+ sha1: "",
18827
+ sha3: "",
18828
+ md5: ""
18829
+ })),
18830
+ folders: result.folders.map((v) => ({
18831
+ id: v.folder_id,
18832
+ name: v.folder_name,
18833
+ fileCount: v.total_file_count,
18834
+ createTime: v.create_time,
18835
+ creatorId: v.creator + "",
18836
+ creatorName: v.creator_name
18837
+ }))
18838
+ };
18839
+ }
18840
+ /**
18841
+ * 获取 Cookies
18842
+ * @param domain The domain to get cookies from
18843
+ */
18844
+ async getCookies(domain) {
18845
+ const result = await this._onebot.getCookies(domain);
18846
+ return { ...result, cookie: result.cookies };
18847
+ }
18848
+ /**
18849
+ * 获取 QQ 相关接口凭证
18850
+ * @param domain The domain to get credentials from
18851
+ */
18852
+ async getCredentials(domain) {
18853
+ const result = await this._onebot.getCredentials(domain);
18854
+ return { ...result, cookies: result.cookies };
18855
+ }
18856
+ /**
18857
+ * 获取 CSRF Token
18858
+ */
18859
+ async getCSRFToken() {
18860
+ const result = await this._onebot.getCsrfToken();
18861
+ return { ...result, token: result.token };
18862
+ }
18863
+ /**
18864
+ * 设置头像
18865
+ * @param file base64:// file:// http(s)://
18866
+ * @returns 是否设置成功
18867
+ */
18868
+ async setAvatar(file2) {
18869
+ try {
18870
+ await this._onebot.setQqAvatar(file2);
18871
+ return true;
18872
+ } catch {
18873
+ return false;
18874
+ }
18875
+ }
18876
+ /**
18877
+ * 获取群 Ai 语音可用声色列表
18878
+ * @returns 声色列表
18879
+ */
18880
+ async getAiCharacters() {
18881
+ const result = await this._onebot.getAiCharacters();
18882
+ return result;
18883
+ }
18884
+ /**
18885
+ * 设置群 Ai 语音声色
18886
+ * @param groupId 群号
18887
+ * @param character 声色ID
18888
+ * @param text 转换的文本
18889
+ */
18890
+ async sendAiCharacter(groupId, character, text2) {
18891
+ const result = await this._onebot.sendGroupAiRecord(+groupId, character, text2);
18892
+ return { messageId: result.message_id + "" };
18893
+ }
18894
+ /**
18895
+ * 获取 rkey
18896
+ * @returns rkey
18897
+ */
18898
+ async getRkey() {
18899
+ const result = await this._onebot.getRkey();
18900
+ return result.rkeys;
18901
+ }
18770
18902
  };
18771
18903
  }
18772
18904
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-karin",
3
- "version": "1.10.11",
3
+ "version": "1.10.12",
4
4
  "description": "Lightweight, efficient, concise, and stable robot framework.",
5
5
  "keywords": [
6
6
  "node",