RadarcordClient
Last updated
Last updated
export default class RadarcordClient;
Represents the main client to access the Radarcord client.
constructor(dJSClient: DiscordJS.Client, authToken: string);
dJSClient
Represents your DiscordJS.Client
.
Type: DiscordJS.Client
authorization
Represents your Radarcord Authorization token.
Type: string
postStats
public async postStats(shardCount: number = 1): Promise<StatsPostResult>
Posts stats to the Radarcord API once, then returns a StatsPostResult
.
Arguments:
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:
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:
callback
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:
callback
shardCount
Number
1
timeoutInterval
IntervalPreset.Default