mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 03:29:51 +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
+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