mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: steam client
This commit is contained in:
1 parent
9ca329e53f
commit
7cb67bd44b
6 files changed
+127
-12
No files matched your search
@@ -13,6 +13,7 @@
|
||||
"@types/bun": "^1.3.1",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/lz4js": "^0.2.1",
|
||||
"@types/steam-user": "^5.1.0",
|
||||
"@types/three": "^0.180.0",
|
||||
"adm-zip": "^0.5.16",
|
||||
"crc": "^4.3.2",
|
||||
@@ -21,6 +22,7 @@
|
||||
"lz4js": "^0.2.0",
|
||||
"pickleparser": "^0.2.1",
|
||||
"protobufjs": "^7.5.4",
|
||||
"steam-user": "^5.2.3",
|
||||
"three": "^0.180.0",
|
||||
"ts-proto": "^2.7.7",
|
||||
"yaml": "^2.8.1"
|
||||
|
||||
+11
-10
@@ -1,10 +1,11 @@
|
||||
export * from './blitz';
|
||||
export * from './blitzkit';
|
||||
export * from './imgur';
|
||||
export * from './math';
|
||||
export * from './patreon';
|
||||
export * from './protobuf';
|
||||
export * from './protos';
|
||||
export * from './statistics';
|
||||
export * from './streams';
|
||||
export * from './types';
|
||||
export * from "./blitz";
|
||||
export * from "./blitzkit";
|
||||
export * from "./imgur";
|
||||
export * from "./math";
|
||||
export * from "./patreon";
|
||||
export * from "./protobuf";
|
||||
export * from "./protos";
|
||||
export * from "./statistics";
|
||||
export * from "./steam";
|
||||
export * from "./streams";
|
||||
export * from "./types";
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./steam";
|
||||
@@ -0,0 +1,23 @@
|
||||
import SteamUser from "steam-user";
|
||||
|
||||
export class Steam extends SteamUser {
|
||||
// call me master hacker the way i be cheesing this up
|
||||
async logOn(...parameters: Parameters<SteamUser["logOn"]>) {
|
||||
let loggedOn = false;
|
||||
const self = this;
|
||||
|
||||
this.on("loggedOn", () => {
|
||||
console.log(`Logged onto ${self.steamID!.steam3()}`);
|
||||
loggedOn = true;
|
||||
});
|
||||
|
||||
while (!loggedOn) {
|
||||
// @ts-ignore
|
||||
this._connectionClosed = false;
|
||||
|
||||
console.log("Attempting to log on...");
|
||||
super.logOn(...parameters);
|
||||
await new Promise((resolve) => setTimeout(resolve, 1000));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user