RadarcordClient
export default class RadarcordClient;
Represents the main client to access the Radarcord client.
Constructor
constructor(dJSClient: DiscordJS.Client, authToken: string);
Properties
dJSClient
dJSClient
Represents your DiscordJS.Client
.
Type: DiscordJS.Client
authorization
authorization
Represents your Radarcord Authorization token.
Type: string
Methods
postStats
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
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
postWithCallback
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
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
Last updated