Class: BotLists


BotLists(webhookEndpoint, botlistData, listenerPortNumber, ipAddress, redirectUrl)

BotLists -> Botlists Class

Constructor

new BotLists(webhookEndpoint, botlistData, listenerPortNumber, ipAddress, redirectUrl)

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

botlistData Object

Botlists Data as ' { "topgg" : { authorizationToken: "xxx-secrettokenhere-xxx",authorizationValue: "xxx-selfmade-AuthorizationValue-xxx", } } ' for comparing fetching token and Json data from resourcess

listenerPortNumber string | number | void | "8080" 8080

Port Number for Express's App to listen , By Default it listens in 8080 as default HTTP port

ipAddress string | number | void | "localhost" localhost

Ip Adddress as "127.0.0.1" or "www.google.com" | No need to add http or https Protocol , just the domain or IP value for it

redirectUrl string | void | "https://github.com/SidisLiveYT/discord-botlists" https://github.com/SidisLiveYT/discord-botlists

Redirect Url for get Request on Webhook Post Url for making it more cooler , By Default -> Github Repo

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

Redirect Url for get Request on Webhook Post Url for making it more cooler , By Default -> Github Repo

eventTrigger boolean | void | true true

Event Trigger for console.log() function | By Default = true

Source:
Returns:

Depends on Incomplete Body or Request , it can return false or complete request.body in Json Format

  • Type: any