steamid
Version:
Exposes a SteamID object class for easy SteamID management
103 lines • 3.61 kB
TypeScript
import { PossibleUniverses, Universes, PossibleTypes, Types, PossibleInstances } from './enums';
declare class SteamID {
/**
* List of possible universes
*/
static get Universe(): PossibleUniverses;
/**
* List of possible types
*/
static get Type(): PossibleTypes;
/**
* List of named instances
*/
static get Instance(): PossibleInstances;
/**
* Mapping of SteamID types to their characters
*/
static get TypeChars(): {
[ ]: string;
};
/**
* Mask to be used to get the AccountID out of a 64-bit SteamID
* @static
* @returns {number}
*/
static get AccountIDMask(): number;
/**
* Mask to be used to get the instance out of the upper 32 bits of a 64-bit SteamID
*/
static get AccountInstanceMask(): number;
/**
* Flags in SteamID instance for chat type IDs
*/
static get ChatInstanceFlags(): {
Lobby: number;
Clan: number;
MMSLobby: number;
};
universe: Universes;
type: Types;
instance: number;
accountid: number;
/**
* Create a new SteamID object.
* @param {string|BigInt} [input] - BigInt containing 64-bit SteamID, or string containing 64-bit SteamID/Steam2/Steam3 text formats. If omitted, creates a blank SteamID object.
*/
constructor(input?: string | bigint | null);
/**
* Creates a new SteamID object from an individual account ID.
*/
static fromIndividualAccountID(accountid: number | bigint | string): SteamID;
/**
* Returns whether Steam would consider a given ID to be "valid".
* This does not check whether the given ID belongs to a real account, nor does it check that the given ID is for
* an individual account or in the public universe.
*/
isValid(): boolean;
/**
* Returns whether this SteamID is valid and belongs to an individual user in the public universe with a desktop instance.
* This is what most people think of when they think of a SteamID. Does not check whether the account actually exists.
*/
isValidIndividual(): boolean;
/**
* Checks whether the given ID is for a legacy group chat.
*/
isGroupChat(): boolean;
/**
* Check whether the given Id is for a game lobby.
*/
isLobby(): boolean;
/**
* Renders the ID in Steam2 format (e.g. "STEAM_0:0:23071901")
* @param {boolean} [newerFormat=false] - If true, use 1 as the first digit instead of 0 for the public universe
*/
steam2(newerFormat?: boolean): string;
/**
* Renders the ID in Steam2 format (e.g. "STEAM_0:0:23071901")
* @param {boolean} [newerFormat=false] - If true, use 1 as the first digit instead of 0 for the public universe
*/
getSteam2RenderedID(newerFormat?: boolean): string;
/**
* Renders the ID in Steam3 format (e.g. "[U:1:46143802]")
*/
steam3(): string;
/**
* Renders the ID in Steam3 format (e.g. "[U:1:46143802]")
*/
getSteam3RenderedID(): string;
/**
* Renders the ID in 64-bit decimal format, as a string (e.g. "76561198006409530")
*/
getSteamID64(): string;
/**
* Renders the ID in 64-bit decimal format, as a string (e.g. "76561198006409530")
*/
toString(): string;
/**
* Renders the ID in 64-bit decimal format, as a BigInt (e.g. 76561198006409530n)
*/
getBigIntID(): bigint;
}
export = SteamID;
//# sourceMappingURL=index.d.ts.map