Skip to content

Class: default

client/Client.default

Hierarchy

default

Table of contents

Constructors

Properties

Methods

Constructors

constructor

+ new default(options?: ClientOptions): default

Parameters:

Name Type
options? ClientOptions

Returns: default

Inherited from: default

Defined in: client/Client.ts:17

Properties

apis

apis: APIs

Defined in: client/Client.ts:13


chat

chat: default

Defined in: client/Client.ts:17


dataStoreManager

dataStoreManager: default

Defined in: client/Client.ts:16


debugger

debugger: object

Type declaration:

Name Type
error Debugger
info Debugger
warn Debugger

Inherited from: default.debugger

Defined in: client/ClientBase.ts:41


options

options: ClientOptions

Inherited from: default.options

Defined in: client/ClientBase.ts:40


rest

rest: default

Defined in: client/Client.ts:14


socket

socket: Socket

Defined in: client/Client.ts:15


user

user: null | default

Defined in: client/Client.ts:12

Methods

getGroup

getGroup(groupId: number): Promise<Group>

Parameters:

Name Type
groupId number

Returns: Promise<Group>

Defined in: client/Client.ts:87


getUser

getUser(userId: string | number): Promise<User>

Parameters:

Name Type
userId string | number

Returns: Promise<User>

Defined in: client/Client.ts:100


getUserIdFromUsername

getUserIdFromUsername(username: string): Promise<PartialUser>

Parameters:

Name Type
username string

Returns: Promise<PartialUser>

Defined in: client/Client.ts:143


getUsernameFromUserId

getUsernameFromUserId(userId: string | number): Promise<PartialUser>

Parameters:

Name Type
userId string | number

Returns: Promise<PartialUser>

Defined in: client/Client.ts:157


getUsersByUserIds

getUsersByUserIds(userIds: number[] | string[], excludeBannedUsers?: boolean): Promise<PartialUser[]>

Parameters:

Name Type Default value
userIds number[] | string[] -
excludeBannedUsers boolean false

Returns: Promise<PartialUser[]>

Defined in: client/Client.ts:168


getUsersByUsernames

getUsersByUsernames(usernames: string[], excludeBannedUsers?: boolean): Promise<PartialUser[]>

Parameters:

Name Type Default value
usernames string[] -
excludeBannedUsers boolean false

Returns: Promise<PartialUser[]>

Defined in: client/Client.ts:180


init

init(): void

Returns: void

Defined in: client/Client.ts:36


isLoggedIn

isLoggedIn(): boolean

Returns: boolean

Defined in: client/Client.ts:32


log

log(level: info | warn | error, data: DebugData): void

Parameters:

Name Type
level info | warn | error
data DebugData

Returns: void

Inherited from: default

Defined in: client/ClientBase.ts:70


login

login(cookie?: string): Promise<default>

Parameters:

Name Type
cookie? string

Returns: Promise<default>

Defined in: client/Client.ts:42


updateOptions

updateOptions(options?: ClientOptions): ClientOptions

Parameters:

Name Type
options? ClientOptions

Returns: ClientOptions

Inherited from: default

Defined in: client/ClientBase.ts:59