DBL Integration

This is an easy way to integrate Discord Bot List voting with your bot.

Enable webhooks

Enabling vote hooking is very easy:

First open your KSoft.Si API dashboard (click here), then select your app and find this:

Then open your bot on Discord Bot List and click edit. Then find this:

In the URL field paste the "Your DBL webhook:" from the dashboard and in the Authorization paste the "Your authentication". So at the end it looks like this:

Click save, and you are done!

Check if user has voted

GET https://api.ksoft.si/webhook/dbl/check

Check if user has voted for your bot.

Query Parameters

NameTypeDescription

bot

integer

Your bot's Discord ID.

user

integer

Discord user ID that you are checking.

Headers

NameTypeDescription

Authorization

string

Authentication token

{
    "voted": true,
    "data": {
        "expiry": "2018-11-02T07:30:37.569592",
        "extras": {
            "reward": "004"  //Query parameters passed to a voting site
        },
        "weekend": false
    }
}

List of votes

GET https://api.ksoft.si/webhook/dbl/list

Get a list of the votes. This can be done once every 10 seconds.

Query Parameters

NameTypeDescription

bot

integer

Your bot's Discord ID.

Headers

NameTypeDescription

Authorization

string

Authentication token

[
    {
        "expiry": "2018-11-02T07:30:37.569592", 
        "extras" {
            "reward": "004"
        }, 
        "user": 175589848982355970, 
        "weekend": false
    }, 
    ...
]

Last updated