Skip to content

Commit

Permalink
Updated PBL
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximKing1 committed Mar 1, 2021
1 parent 5d9ed07 commit cac8223
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
31 changes: 23 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,15 @@ yarn add blwebhooks@nightly

# Supported Lists

| Name | Features | UserID | BotID | Event Name |
| --------------- | ------------------- | ------ | ----- | ----------- |
| top.gg | `DATABASE`, `HOOKS` | true | true | topgg-voted |
| InfinityBotList | `DATABASE`, `HOOKS` | true | true | IBL-voted |
| VoidBots | `DATABASE`, `HOOKS` | true | true | VB-voted |
| DiscordLabs | `DATABASE`, `HOOKS` | true | true | DL-voted |
| Blist | `DATABASE`, `HOOKS` | true | true | BLT-voted |
| DiscordBots.co | `DATABASE`, `HOOKS` | true | true | DBC-voted |
| Name | Features | UserID | BotID | userName | Event Name |
| --------------- | ------------------- | ------ | ----- | -------- | ----------- |
| top.gg | `DATABASE`, `HOOKS` | true | true | false | topgg-voted |
| InfinityBotList | `DATABASE`, `HOOKS` | true | true | false | IBL-voted |
| VoidBots | `DATABASE`, `HOOKS` | true | true | false | VB-voted |
| DiscordLabs | `DATABASE`, `HOOKS` | true | true | false | DL-voted |
| Blist | `DATABASE`, `HOOKS` | true | true | false | BLT-voted |
| DiscordBots.co | `DATABASE`, `HOOKS` | true | true | false | DBC-voted |
| ParadiseBotList | `DATABASE`, `HOOKS` | true | true | true | PBL-voted |

# Future Lists

Expand Down Expand Up @@ -290,6 +291,20 @@ client.on("DBC-voted", async function (userID, botID) {
});
```

**ParadiseBotList Vote Hooks:**

```js
// This will listen to votes from BList, the url is the end not
// including the / and auth is the webhook auth. You can enable and
// disable using true or false at the end
client.voteManager.PBLVoteHook(url, auth, true);

// This code will run after a new vote was received from BList
client.on("PBL-voted", async function (userID, botID, userName) {
console.log(`${userName} (${userID}) Voted For <#${botID}>`);
});
```

# Events

**Global Voted Event**
Expand Down
2 changes: 1 addition & 1 deletion src/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ class WebhooksManager extends EventEmitter {
const userID = req.body.userID;
const botID = req.body.bot;
const userName = req.body.user;
const type = req.body.type;
const type = null;
const List = "ParaiseBots";
this.client.emit("PBL-voted", userID, botID, userName, type);
this.client.emit("vote", userID, botID, List);
Expand Down

0 comments on commit cac8223

Please sign in to comment.