RadarcordClient

src/Client.ts
export default class RadarcordClient;

Represents the main client to access the Radarcord client.

Constructor

constructor(dJSClient: DiscordJS.Client, authToken: string);

Properties

dJSClient

Represents your DiscordJS.Client.

Type: DiscordJS.Client

authorization

Represents your Radarcord Authorization token.

Type: string

Methods

postStats

public async postStats(shardCount: number = 1): Promise<StatsPostResult>

Posts stats to the Radarcord API once, then returns a StatsPostResult.

Arguments:

Name
Type
Required?
Default

shardCount

Number

1

autopostStats

public async autopostStats(shardCount: number = 1, timeoutInterval: IntervalPreset = IntervalPreset.Default): Promise<void>

Automatically posts stats to the Radarcord API, but does not return anything.

Arguments:

Name
Type
Required?
Default

shardCount

Number

1

timeoutInterval

IntervalPreset.Default

postWithCallback

public async postWithCallback(callback: StatsPostCallback, shardCount: number = 1): Promise<void>

Posts stats, then runs a callback. Useful for logging your post result.

Arguments:

Name
Type
Required?
Default

shardCount

Number

1

autopostWithCallback

public async autopostWithCallback(callback: StatsPostCallback, shardCount: number = 1, timeoutInterval: IntervalPreset = IntervalPreset.Default): Promise<void>

Autoposts and runs a callback every time a post is completed.

Arguments:

Name
Type
Required?
Default

shardCount

Number

1

timeoutInterval

IntervalPreset.Default

Last updated