Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

Commit

Permalink
new version
Browse files Browse the repository at this point in the history
happy life
  • Loading branch information
takayama-lily committed May 20, 2021
1 parent cb52831 commit 53b73ec
Show file tree
Hide file tree
Showing 13 changed files with 597 additions and 525 deletions.
15 changes: 9 additions & 6 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,8 @@ export type GfsStat = GfsFileStat | GfsDirStat;
/**
* 这里面的方法是会reject的,需要catch
*/
declare class Gfs {
export class Gfs {
private constructor();
/** 群号 */
readonly gid: number;
/** 查看文件属性(尽量不要对目录使用此方法) */
Expand Down Expand Up @@ -767,7 +768,7 @@ export class Client extends EventEmitter {
setGroupSpecialTitle(group_id: number, user_id: number, special_title?: string, duration?: number): Promise<Ret>;
/** 设置群名片 */
setGroupCard(group_id: number, user_id: number, card?: string): Promise<Ret>;
/** 踢人 */
/** 踢人(不支持批量) */
setGroupKick(group_id: number, user_id: number, reject_add_request?: boolean): Promise<Ret>;
/** 禁言 */
setGroupBan(group_id: number, user_id: number, duration?: number): Promise<Ret>;
Expand All @@ -785,15 +786,15 @@ export class Client extends EventEmitter {
/** 获取未处理的请求 */
getSystemMsg(): Promise<Ret<Array<FriendAddEventData | GroupAddEventData | GroupInviteEventData>>>;

/** 添加群(该接口风控) */
/** 该接口风控 */
addGroup(group_id: number, comment?: string): Promise<Ret>;
/** 添加好友(只能添加群员) */
/** 该接口风控(只能添加群员) */
addFriend(group_id: number, user_id: number, comment?: string): Promise<Ret>;
/** 删除好友 */
deleteFriend(user_id: number, block?: boolean): Promise<Ret>;
/** 邀请好友入群 */
/** 邀请好友入群(不支持陌生人和批量) */
inviteFriend(group_id: number, user_id: number): Promise<Ret>;
/** 点赞(times默认1) */
/** 点赞(times默认1,不支持陌生人) */
sendLike(user_id: number, times?: number): Promise<Ret>;

/** 设置昵称 */
Expand Down Expand Up @@ -862,6 +863,8 @@ export class Client extends EventEmitter {
getStatus(): Ret<Status>;
/** 获取登录账号信息 */
getLoginInfo(): Ret<LoginInfo>;
/** 获取等级信息(默认获取自己的) */
getLevelInfo(user_id?: number): Promise<Ret<any>>;

/** 进入群文件系统 */
acuqireGfs(group_id: number): Gfs;
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use strict";
const { Client, createClient } = require("./lib/client");
const { Client, createClient } = require("./lib/oicq");
const { segment, cqcode } = require("./util");
module.exports = {
setGlobalConfig: () => { },
Expand Down
Loading

0 comments on commit 53b73ec

Please sign in to comment.