Constructor
new BotLists(webhookEndpoint, botlistData, listenerPortNumber, ipAddress, redirectUrl)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
webhookEndpoint |
string | void |
|
|
botlistData |
Object |
|
|
listenerPortNumber |
string | number | void | "8080" | 8080 |
|
ipAddress |
string | number | void | "localhost" | localhost |
|
redirectUrl |
string | void | "https://github.com/SidisLiveYT/discord-botlists" | https://github.com/SidisLiveYT/discord-botlists |
|
- Source:
Extends
- EventEmitter
Methods
autoPoster(apiBody, AxioshttpConfigs, Timer, eventOnPost, IgnoreErrors) → {NodeJS.Timer}
autoPoster() -> Auto-osting Stats of the Current Bot to Multiple Botlists mentioned
Parameters:
Name | Type | Default | Description |
---|---|---|---|
apiBody |
postApiBody | Api-Body for Posting Data as per params for API requirements and strictly for if required |
|
AxioshttpConfigs |
Object | void | To Add Proxies to avoid Ratelimit |
|
Timer |
number | void | Time in Milli-Seconds to Post at every Interval Gap |
|
eventOnPost |
boolean | void | true | What if event to be triggered on Post or should be closed |
IgnoreErrors |
Boolean | void | true | Boolean Value for Ignoring Request Handling Errors |
- Source:
Returns:
Node Timer Id to Cancel for further purposes
- Type: NodeJS.Timer
(async) poststats(apiBody, eventOnPost, AxioshttpConfigs, forcePosting, IgnoreErrors) → {Promise.<Boolean>}
post() -> Posting Stats of the Current Bot to Multiple Botlists mentioned by
Parameters:
Name | Type | Default | Description |
---|---|---|---|
apiBody |
postApiBody | Api-Body for Posting Data as per params for API requirements and strictly for if required |
|
eventOnPost |
boolean | void | true | true | What if event to be triggered on Post or should be closed |
AxioshttpConfigs |
Object | void | To Add Proxies to avoid Ratelimit |
|
forcePosting |
boolean | void | false | false | Force Posting and ignoring in-built Ratelimit function | Users can face un-expected ratelimit from API |
IgnoreErrors |
Boolean | void | true | true | Boolean Value for Ignoring Request Handling Errors |
- Source:
Returns:
Booelan Response on success or failure
- Type: Promise.<Boolean>
(async) start(webhookEndpoint, redirectUrl, eventTrigger) → {any}
start() -> Starting Webhook for Vote Event Trigger
Parameters:
Name | Type | Default | Description |
---|---|---|---|
webhookEndpoint |
string | void | Webhook Endpoint for "https://ipaddress:port/webhookEndpoint" to make selective path for Webhook's HTTP Post Request |
|
redirectUrl |
string | void | 'https://github.com/SidisLiveYT/discord-botlists' | https://github.com/SidisLiveYT/discord-botlists |
|
eventTrigger |
boolean | void | true | true |
|
- Source:
Returns:
Depends on Incomplete Body or Request , it can return false or complete request.body in Json Format
- Type: any