@naplink/naplink 0.0.1 → 0.0.3

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/README.md CHANGED
@@ -27,15 +27,12 @@
27
27
  - [事件处理](https://naplink.github.io/guide/events) - 事件系统详解
28
28
  - [最佳实践](https://naplink.github.io/guide/best-practices) - 生产环境建议
29
29
  - [架构设计](https://naplink.github.io/guide/architecture) - 内部实现
30
+ - 最佳实践项目:[NapGram](https://github.com/NapLink/NapGram) - 基于 NapLink 的 QQ ↔ Telegram 消息桥接
30
31
 
31
32
  ## 📦 安装
32
33
 
33
34
  ```bash
34
- npm install naplink
35
- # 或
36
35
  pnpm add naplink
37
- # 或
38
- yarn add naplink
39
36
  ```
40
37
 
41
38
  ## 🔧 配置示例
@@ -67,19 +64,19 @@ const client = new NapLink({
67
64
 
68
65
  ```bash
69
66
  # 安装依赖
70
- npm install
67
+ pnpm install
71
68
 
72
69
  # 开发模式
73
- npm run dev
70
+ pnpm dev
74
71
 
75
72
  # 构建
76
- npm run build
73
+ pnpm build
77
74
 
78
75
  # 测试
79
- npm test
76
+ pnpm test
80
77
 
81
78
  # 类型检查
82
- npm run typecheck
79
+ pnpm typecheck
83
80
  ```
84
81
 
85
82
  ## 📄 许可证
package/dist/index.d.ts CHANGED
@@ -101,13 +101,15 @@ declare class ConnectionManager {
101
101
  private logger;
102
102
  private onMessage;
103
103
  private onStateChange;
104
+ private emitter?;
104
105
  private ws?;
105
106
  private state;
106
107
  private reconnectService;
107
108
  private heartbeatService?;
108
109
  private connectPromise?;
109
110
  private connectTimeout?;
110
- constructor(config: NapLinkConfig, logger: Logger, onMessage: (data: string) => void, onStateChange: (state: ConnectionState) => void);
111
+ private wasReconnecting;
112
+ constructor(config: NapLinkConfig, logger: Logger, onMessage: (data: string) => void, onStateChange: (state: ConnectionState, wasReconnecting?: boolean) => void, emitter?: any | undefined);
111
113
  /**
112
114
  * 连接到WebSocket服务器
113
115
  */
@@ -175,6 +177,16 @@ declare class ApiClient {
175
177
  timeout?: number;
176
178
  retries?: number;
177
179
  }): Promise<T>;
180
+ /**
181
+ * 调用流式 API(NapCat stream-action)
182
+ * 会持续产出 data.type=stream 的分片包,并在 data.type=response 时结束。
183
+ */
184
+ callStream<TPacket = any, TFinal = any>(method: string, params?: any, options?: {
185
+ timeout?: number;
186
+ }): {
187
+ packets: AsyncIterable<TPacket>;
188
+ result: Promise<TFinal>;
189
+ };
178
190
  /**
179
191
  * 处理API响应
180
192
  * 由连接管理器调用
@@ -402,9 +414,37 @@ type MessageApi = {
402
414
  deleteEssenceMessage(messageId: number | string): Promise<any>;
403
415
  getEssenceMessageList(groupId: number | string): Promise<any>;
404
416
  markMessageAsRead(messageId: number | string): Promise<any>;
417
+ markGroupMsgAsRead(groupId: number | string): Promise<any>;
418
+ markPrivateMsgAsRead(userId: number | string): Promise<any>;
419
+ markAllMsgAsRead(): Promise<any>;
405
420
  getGroupAtAllRemain(groupId: number | string): Promise<number>;
406
421
  getGroupSystemMsg(): Promise<GroupSystemMessages>;
407
422
  getGroupHonorInfo(groupId: number | string, type: 'all' | 'talkative' | 'performer' | 'legend' | 'strong_newbie' | 'emotion'): Promise<GroupHonorInfo>;
423
+ getGroupMsgHistory(params: {
424
+ group_id: number | string;
425
+ message_seq: number | string;
426
+ count: number;
427
+ reverse_order?: boolean;
428
+ }): Promise<any>;
429
+ getFriendMsgHistory(params: {
430
+ user_id: number | string;
431
+ message_seq: number | string;
432
+ count: number;
433
+ reverse_order?: boolean;
434
+ }): Promise<any>;
435
+ getRecentContact(count: number): Promise<any>;
436
+ setMsgEmojiLike(messageId: number | string, emojiId: number, set: boolean): Promise<any>;
437
+ fetchEmojiLike(params: {
438
+ message_id: number | string;
439
+ emojiId: string;
440
+ emojiType: string;
441
+ group_id?: number | string;
442
+ user_id?: number | string;
443
+ count?: number;
444
+ }): Promise<any>;
445
+ sendGroupPoke(groupId: number | string, userId: number | string): Promise<any>;
446
+ sendFriendPoke(userId: number | string): Promise<any>;
447
+ sendPoke(targetId: number | string, groupId?: number | string): Promise<any>;
408
448
  };
409
449
 
410
450
  type MediaApi = {
@@ -465,6 +505,70 @@ type StreamApi = {
465
505
  verifyOnly?: boolean;
466
506
  }): Promise<any>;
467
507
  getUploadStreamStatus(streamId: string): Promise<any>;
508
+ /**
509
+ * 流式下载文件(原始分片包)
510
+ * - data_type=file_info / file_chunk / file_complete
511
+ * - type=stream / response
512
+ */
513
+ downloadFileStream(fileId: string, options?: {
514
+ chunkSize?: number;
515
+ }): {
516
+ packets: AsyncIterable<DownloadStreamPacket>;
517
+ result: Promise<DownloadStreamPacket>;
518
+ };
519
+ downloadFileStreamToFile(fileId: string, options?: {
520
+ chunkSize?: number;
521
+ filename?: string;
522
+ }): Promise<{
523
+ path: string;
524
+ info?: DownloadStreamPacket;
525
+ }>;
526
+ downloadFileImageStream(fileId: string, options?: {
527
+ chunkSize?: number;
528
+ }): {
529
+ packets: AsyncIterable<DownloadStreamPacket>;
530
+ result: Promise<DownloadStreamPacket>;
531
+ };
532
+ downloadFileImageStreamToFile(fileId: string, options?: {
533
+ chunkSize?: number;
534
+ filename?: string;
535
+ }): Promise<{
536
+ path: string;
537
+ info?: DownloadStreamPacket;
538
+ }>;
539
+ downloadFileRecordStream(fileId: string, outFormat?: string, options?: {
540
+ chunkSize?: number;
541
+ filename?: string;
542
+ }): {
543
+ packets: AsyncIterable<DownloadStreamPacket>;
544
+ result: Promise<DownloadStreamPacket>;
545
+ };
546
+ downloadFileRecordStreamToFile(fileId: string, outFormat?: string, options?: {
547
+ chunkSize?: number;
548
+ filename?: string;
549
+ }): Promise<{
550
+ path: string;
551
+ info?: DownloadStreamPacket;
552
+ }>;
553
+ cleanStreamTempFile(): Promise<any>;
554
+ };
555
+ type DownloadStreamPacket = {
556
+ type: 'stream' | 'response' | 'reset' | 'error';
557
+ data_type?: 'file_info' | 'file_chunk' | 'file_complete' | string;
558
+ file_name?: string;
559
+ file_size?: number;
560
+ chunk_size?: number;
561
+ index?: number;
562
+ data?: string;
563
+ size?: number;
564
+ progress?: number;
565
+ base64_size?: number;
566
+ total_chunks?: number;
567
+ total_bytes?: number;
568
+ message?: string;
569
+ width?: number;
570
+ height?: number;
571
+ out_format?: string;
468
572
  };
469
573
 
470
574
  type RequestApi = {
@@ -472,6 +576,103 @@ type RequestApi = {
472
576
  handleGroupRequest(flag: string, subType: 'add' | 'invite', approve?: boolean, reason?: string): Promise<any>;
473
577
  };
474
578
 
579
+ type SystemApi = {
580
+ getOnlineClients(noCache?: boolean): Promise<any>;
581
+ getRobotUinRange(): Promise<any>;
582
+ canSendImage(): Promise<any>;
583
+ canSendRecord(): Promise<any>;
584
+ getCookies(domain: string): Promise<any>;
585
+ getCsrfToken(): Promise<any>;
586
+ getCredentials(domain: string): Promise<any>;
587
+ setInputStatus(userId: number | string, eventType: number): Promise<any>;
588
+ ocrImage(image: string, dot?: boolean): Promise<any>;
589
+ translateEn2zh(words: string[]): Promise<any>;
590
+ checkUrlSafely(url: string): Promise<any>;
591
+ handleQuickOperation(context: any, operation: any): Promise<any>;
592
+ getModelShow(model: string): Promise<any>;
593
+ setModelShow(model: string, modelShow: string): Promise<any>;
594
+ getPacketStatus(): Promise<any>;
595
+ };
596
+
597
+ type NapCatApi = {
598
+ getRkeyEx(): Promise<any>;
599
+ getRkeyServer(): Promise<any>;
600
+ getRkey(): Promise<any>;
601
+ setFriendRemark(userId: number | string, remark: string): Promise<any>;
602
+ deleteFriend(userId: number | string): Promise<any>;
603
+ getUnidirectionalFriendList(): Promise<any>;
604
+ setGroupRemark(groupId: number | string, remark: string): Promise<any>;
605
+ getGroupInfoEx(groupId: number | string): Promise<any>;
606
+ getGroupDetailInfo(groupId: number | string): Promise<any>;
607
+ getGroupIgnoredNotifies(): Promise<any>;
608
+ getGroupShutList(groupId: number | string): Promise<any>;
609
+ sendPrivateForwardMessage(params: {
610
+ user_id: number | string;
611
+ messages: any[];
612
+ news?: any[];
613
+ prompt?: string;
614
+ summary?: string;
615
+ source?: string;
616
+ }): Promise<any>;
617
+ forwardFriendSingleMsg(userId: number | string, messageId: number | string): Promise<any>;
618
+ forwardGroupSingleMsg(groupId: number | string, messageId: number | string): Promise<any>;
619
+ sendForwardMsg(params: {
620
+ group_id?: number | string;
621
+ user_id?: number | string;
622
+ messages: any[];
623
+ news?: any[];
624
+ prompt?: string;
625
+ summary?: string;
626
+ source?: string;
627
+ }): Promise<any>;
628
+ sendGroupNotice(params: {
629
+ group_id: number | string;
630
+ content: string;
631
+ image?: string;
632
+ pinned?: number | string;
633
+ type?: number | string;
634
+ confirm_required?: number | string;
635
+ is_show_edit_card?: number | string;
636
+ tip_window_type?: number | string;
637
+ }): Promise<any>;
638
+ getGroupNotice(groupId: number | string): Promise<any>;
639
+ delGroupNotice(groupId: number | string, noticeId: string): Promise<any>;
640
+ setOnlineStatus(status: number | string, extStatus: number | string, batteryStatus: number | string): Promise<any>;
641
+ setDiyOnlineStatus(faceId: number | string, wording?: string, faceType?: number | string): Promise<any>;
642
+ sendArkShare(params: {
643
+ user_id?: number | string;
644
+ group_id?: number | string;
645
+ phone_number?: string;
646
+ }): Promise<any>;
647
+ sendGroupArkShare(groupId: number | string): Promise<any>;
648
+ getMiniAppArk(payload: any): Promise<any>;
649
+ getAiCharacters(groupId: number | string, chatType?: number | string): Promise<any>;
650
+ getAiRecord(groupId: number | string, character: string, text: string): Promise<any>;
651
+ sendGroupAiRecord(groupId: number | string, character: string, text: string): Promise<any>;
652
+ setGroupSign(groupId: number | string): Promise<any>;
653
+ sendGroupSign(groupId: number | string): Promise<any>;
654
+ fetchCustomFace(params?: any): Promise<any>;
655
+ getClientkey(): Promise<any>;
656
+ clickInlineKeyboardButton(params: {
657
+ group_id: number | string;
658
+ bot_appid: string;
659
+ button_id?: string;
660
+ callback_data?: string;
661
+ msg_seq?: string;
662
+ }): Promise<any>;
663
+ };
664
+
665
+ /**
666
+ * NapCatQQ ActionName 全量列表(服务端路由表)
667
+ * - 可用于“完全覆盖”服务端 action,而不必在 SDK 里为每个 action 单独写一层包装。
668
+ * - 对于包含 '.'/'_' 等前缀的 action,建议使用 bracket 访问:api.raw['.ocr_image'](...)
669
+ */
670
+ declare const NAPCAT_ACTIONS: readonly [".get_word_slices", ".handle_quick_operation", ".ocr_image", "ArkShareGroup", "ArkSharePeer", "_del_group_notice", "_get_group_notice", "_get_model_show", "_mark_all_as_read", "_send_group_notice", "_set_model_show", "bot_exit", "can_send_image", "can_send_record", "check_url_safely", "clean_cache", "clean_stream_temp_file", "click_inline_keyboard_button", "create_collection", "create_group_file_folder", "del_group_album_media", "delete_essence_msg", "delete_friend", "delete_group_file", "delete_group_folder", "delete_msg", "delete_unidirectional_friend", "do_group_album_comment", "download_file", "download_file_image_stream", "download_file_record_stream", "download_file_stream", "fetch_custom_face", "fetch_emoji_like", "forward_friend_single_msg", "forward_group_single_msg", "friend_poke", "get_ai_characters", "get_ai_record", "get_clientkey", "get_collection_list", "get_cookies", "get_credentials", "get_csrf_token", "get_doubt_friends_add_request", "get_essence_msg_list", "get_file", "get_forward_msg", "get_friend_list", "get_friend_msg_history", "get_friends_with_category", "get_group_album_media_list", "get_group_at_all_remain", "get_group_detail_info", "get_group_file_system_info", "get_group_file_url", "get_group_files_by_folder", "get_group_honor_info", "get_group_ignore_add_request", "get_group_ignored_notifies", "get_group_info", "get_group_info_ex", "get_group_list", "get_group_member_info", "get_group_member_list", "get_group_msg_history", "get_group_root_files", "get_group_shut_list", "get_group_system_msg", "get_guild_list", "get_guild_service_profile", "get_image", "get_login_info", "get_mini_app_ark", "get_msg", "get_online_clients", "get_private_file_url", "get_profile_like", "get_qun_album_list", "get_recent_contact", "get_record", "get_rkey", "get_rkey_server", "get_robot_uin_range", "get_status", "get_stranger_info", "get_unidirectional_friend_list", "get_version_info", "group_poke", "mark_group_msg_as_read", "mark_msg_as_read", "mark_private_msg_as_read", "move_group_file", "nc_get_packet_status", "nc_get_rkey", "nc_get_user_status", "ocr_image", "qidian_get_account_info", "reboot_normal", "reload_event_filter", "rename_group_file", "send_ark_share", "send_forward_msg", "send_group_ai_record", "send_group_ark_share", "send_group_forward_msg", "send_group_msg", "send_group_sign", "send_like", "send_msg", "send_packet", "send_poke", "send_private_forward_msg", "send_private_msg", "set_diy_online_status", "set_doubt_friends_add_request", "set_essence_msg", "set_friend_add_request", "set_friend_remark", "set_group_add_option", "set_group_add_request", "set_group_admin", "set_group_album_media_like", "set_group_anonymous", "set_group_anonymous_ban", "set_group_ban", "set_group_card", "set_group_kick", "set_group_kick_members", "set_group_leave", "set_group_name", "set_group_portrait", "set_group_remark", "set_group_robot_add_option", "set_group_search", "set_group_sign", "set_group_special_title", "set_group_todo", "set_group_whole_ban", "set_input_status", "set_msg_emoji_like", "set_online_status", "set_qq_avatar", "set_qq_profile", "set_restart", "set_self_longnick", "test_auto_register_01", "test_auto_register_02", "test_download_stream", "trans_group_file", "translate_en2zh", "unknown", "upload_file_stream", "upload_group_file", "upload_image_to_qun_album", "upload_private_file"];
671
+ type NapCatAction = typeof NAPCAT_ACTIONS[number];
672
+ type RawActionApi = {
673
+ [K in NapCatAction]: (params?: any) => Promise<any>;
674
+ };
675
+
475
676
  /**
476
677
  * OneBot 11 API 封装
477
678
  * 将 ApiClient 的底层 call 转为清晰的业务方法
@@ -485,9 +686,12 @@ declare class OneBotApi {
485
686
  private fileApi;
486
687
  private streamApi;
487
688
  private requestApi;
689
+ private systemApi;
690
+ private napcatApi;
691
+ readonly raw: RawActionApi;
488
692
  constructor(client: ApiClient, logger: Logger);
489
693
  }
490
- interface OneBotApi extends MessageApi, MediaApi, AccountApi, GroupApi, FileApi, StreamApi, RequestApi {
694
+ interface OneBotApi extends MessageApi, MediaApi, AccountApi, GroupApi, FileApi, StreamApi, RequestApi, SystemApi, NapCatApi {
491
695
  }
492
696
 
493
697
  /**
@@ -511,6 +715,9 @@ type OneBotApiMethods = {
511
715
  getForwardMessage(id: string): Promise<any>;
512
716
  getEssenceMessageList(groupId: number | string): Promise<any>;
513
717
  markMessageAsRead(messageId: number | string): Promise<any>;
718
+ markGroupMsgAsRead(groupId: number | string): Promise<any>;
719
+ markPrivateMsgAsRead(userId: number | string): Promise<any>;
720
+ markAllMsgAsRead(): Promise<any>;
514
721
  getGroupAtAllRemain(groupId: number | string): Promise<any>;
515
722
  getGroupSystemMsg(): Promise<any>;
516
723
  getGroupHonorInfo(groupId: number | string, type: 'all' | 'talkative' | 'performer' | 'legend' | 'strong_newbie' | 'emotion'): Promise<any>;
@@ -532,7 +739,74 @@ type OneBotApiMethods = {
532
739
  verifyOnly?: boolean;
533
740
  }): Promise<any>;
534
741
  getUploadStreamStatus(streamId: string): Promise<any>;
742
+ downloadFileStream(fileId: string, options?: {
743
+ chunkSize?: number;
744
+ }): {
745
+ packets: AsyncIterable<any>;
746
+ result: Promise<any>;
747
+ };
748
+ downloadFileStreamToFile(fileId: string, options?: {
749
+ chunkSize?: number;
750
+ filename?: string;
751
+ }): Promise<{
752
+ path: string;
753
+ info?: any;
754
+ }>;
755
+ downloadFileImageStream(fileId: string, options?: {
756
+ chunkSize?: number;
757
+ }): {
758
+ packets: AsyncIterable<any>;
759
+ result: Promise<any>;
760
+ };
761
+ downloadFileImageStreamToFile(fileId: string, options?: {
762
+ chunkSize?: number;
763
+ filename?: string;
764
+ }): Promise<{
765
+ path: string;
766
+ info?: any;
767
+ }>;
768
+ downloadFileRecordStream(fileId: string, outFormat?: string, options?: {
769
+ chunkSize?: number;
770
+ filename?: string;
771
+ }): {
772
+ packets: AsyncIterable<any>;
773
+ result: Promise<any>;
774
+ };
775
+ downloadFileRecordStreamToFile(fileId: string, outFormat?: string, options?: {
776
+ chunkSize?: number;
777
+ filename?: string;
778
+ }): Promise<{
779
+ path: string;
780
+ info?: any;
781
+ }>;
782
+ cleanStreamTempFile(): Promise<any>;
535
783
  sendGroupForwardMessage(groupId: number | string, messages: any[]): Promise<any>;
784
+ getGroupMsgHistory(params: {
785
+ group_id: number | string;
786
+ message_seq: number | string;
787
+ count: number;
788
+ reverse_order?: boolean;
789
+ }): Promise<any>;
790
+ getFriendMsgHistory(params: {
791
+ user_id: number | string;
792
+ message_seq: number | string;
793
+ count: number;
794
+ reverse_order?: boolean;
795
+ }): Promise<any>;
796
+ getRecentContact(count: number): Promise<any>;
797
+ setMsgEmojiLike(messageId: number | string, emojiId: number, set: boolean): Promise<any>;
798
+ fetchEmojiLike(params: {
799
+ message_id: number | string;
800
+ emojiId: string;
801
+ emojiType: string;
802
+ group_id?: number | string;
803
+ user_id?: number | string;
804
+ count?: number;
805
+ }): Promise<any>;
806
+ fetchCustomFace(params?: any): Promise<any>;
807
+ sendGroupPoke(groupId: number | string, userId: number | string): Promise<any>;
808
+ sendFriendPoke(userId: number | string): Promise<any>;
809
+ sendPoke(targetId: number | string, groupId?: number | string): Promise<any>;
536
810
  getImage(file: string): Promise<any>;
537
811
  getRecord(file: string, outFormat?: string): Promise<any>;
538
812
  getFile(file: string): Promise<any>;
@@ -561,6 +835,90 @@ type OneBotApiMethods = {
561
835
  getVersionInfo(): Promise<any>;
562
836
  handleFriendRequest(flag: string, approve?: boolean, remark?: string): Promise<any>;
563
837
  handleGroupRequest(flag: string, subType: 'add' | 'invite', approve?: boolean, reason?: string): Promise<any>;
838
+ getOnlineClients(noCache?: boolean): Promise<any>;
839
+ getRobotUinRange(): Promise<any>;
840
+ canSendImage(): Promise<any>;
841
+ canSendRecord(): Promise<any>;
842
+ getCookies(domain: string): Promise<any>;
843
+ getCsrfToken(): Promise<any>;
844
+ getCredentials(domain: string): Promise<any>;
845
+ setInputStatus(userId: number | string, eventType: number): Promise<any>;
846
+ ocrImage(image: string, dot?: boolean): Promise<any>;
847
+ translateEn2zh(words: string[]): Promise<any>;
848
+ checkUrlSafely(url: string): Promise<any>;
849
+ handleQuickOperation(context: any, operation: any): Promise<any>;
850
+ getModelShow(model: string): Promise<any>;
851
+ setModelShow(model: string, modelShow: string): Promise<any>;
852
+ getPacketStatus(): Promise<any>;
853
+ getRkeyEx(): Promise<any>;
854
+ getRkeyServer(): Promise<any>;
855
+ getRkey(): Promise<any>;
856
+ setFriendRemark(userId: number | string, remark: string): Promise<any>;
857
+ deleteFriend(userId: number | string): Promise<any>;
858
+ getUnidirectionalFriendList(): Promise<any>;
859
+ setGroupRemark(groupId: number | string, remark: string): Promise<any>;
860
+ getGroupInfoEx(groupId: number | string): Promise<any>;
861
+ getGroupDetailInfo(groupId: number | string): Promise<any>;
862
+ getGroupIgnoredNotifies(): Promise<any>;
863
+ getGroupShutList(groupId: number | string): Promise<any>;
864
+ sendPrivateForwardMessage(params: {
865
+ user_id: number | string;
866
+ messages: any[];
867
+ news?: any[];
868
+ prompt?: string;
869
+ summary?: string;
870
+ source?: string;
871
+ }): Promise<any>;
872
+ forwardFriendSingleMsg(userId: number | string, messageId: number | string): Promise<any>;
873
+ forwardGroupSingleMsg(groupId: number | string, messageId: number | string): Promise<any>;
874
+ sendForwardMsg(params: {
875
+ group_id?: number | string;
876
+ user_id?: number | string;
877
+ messages: any[];
878
+ news?: any[];
879
+ prompt?: string;
880
+ summary?: string;
881
+ source?: string;
882
+ }): Promise<any>;
883
+ sendGroupNotice(params: {
884
+ group_id: number | string;
885
+ content: string;
886
+ image?: string;
887
+ pinned?: number | string;
888
+ type?: number | string;
889
+ confirm_required?: number | string;
890
+ is_show_edit_card?: number | string;
891
+ tip_window_type?: number | string;
892
+ }): Promise<any>;
893
+ getGroupNotice(groupId: number | string): Promise<any>;
894
+ delGroupNotice(groupId: number | string, noticeId: string): Promise<any>;
895
+ setOnlineStatus(status: number | string, extStatus: number | string, batteryStatus: number | string): Promise<any>;
896
+ setDiyOnlineStatus(faceId: number | string, wording?: string, faceType?: number | string): Promise<any>;
897
+ sendArkShare(params: {
898
+ user_id?: number | string;
899
+ group_id?: number | string;
900
+ phone_number?: string;
901
+ }): Promise<any>;
902
+ sendGroupArkShare(groupId: number | string): Promise<any>;
903
+ getMiniAppArk(payload: any): Promise<any>;
904
+ getAiCharacters(groupId: number | string, chatType?: number | string): Promise<any>;
905
+ getAiRecord(groupId: number | string, character: string, text: string): Promise<any>;
906
+ sendGroupAiRecord(groupId: number | string, character: string, text: string): Promise<any>;
907
+ setGroupSign(groupId: number | string): Promise<any>;
908
+ sendGroupSign(groupId: number | string): Promise<any>;
909
+ getClientkey(): Promise<any>;
910
+ clickInlineKeyboardButton(params: {
911
+ group_id: number | string;
912
+ bot_appid: string;
913
+ button_id?: string;
914
+ callback_data?: string;
915
+ msg_seq?: string;
916
+ }): Promise<any>;
917
+ /**
918
+ * Raw action table (ActionName 全覆盖)
919
+ * 访问方式:client.raw['get_group_shut_list']({ group_id: 123 })
920
+ */
921
+ raw: any;
564
922
  };
565
923
 
566
924
  /**