Skip to content

Commit

Permalink
dddd
Browse files Browse the repository at this point in the history
  • Loading branch information
nk-ava committed Dec 13, 2023
1 parent fc211e9 commit f176b81
Show file tree
Hide file tree
Showing 5 changed files with 689 additions and 326 deletions.
20 changes: 19 additions & 1 deletion lib/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export class Client extends BaseClient {
cache_group_member: true,
reconn_interval: 5,
data_dir: path.join(require?.main?.path || process.cwd(), "data"),
ver: "8.9.63" as Version,
...conf,
}

Expand All @@ -171,7 +172,7 @@ export class Client extends BaseClient {
fs.writeFile(file, JSON.stringify(device, null, 2), NOOP)
}

super(uin, config.platform, device)
super(uin, config.platform, config.ver, device)

this.logger = log4js.getLogger(`[${this.apk.display}:${uin}]`)
;(this.logger as log4js.Logger).level = config.log_level
Expand Down Expand Up @@ -737,11 +738,28 @@ export interface Config {
ffprobe_path?: string
/** 请求签名接口 */
sign_api_addr?: string
/** QQ协议版本 */
ver: Version
}

/** 数据统计 */
export type Statistics = Client["stat"]

/** 协议版本 */
export type Version =
"8.9.63"
| "8.9.68"
| "8.9.70"
| "8.9.71"
| "8.9.73"
| "8.9.75"
| "8.9.76"
| "8.9.78"
| "8.9.80"
| "8.9.83"
| "8.9.85"
| "8.9.88"

function createDataDir(dir: string, uin: number) {
if (!fs.existsSync(dir))
fs.mkdirSync(dir, {mode: 0o755, recursive: true})
Expand Down
Loading

0 comments on commit f176b81

Please sign in to comment.