Skip to content

Commit cac8223

Browse files
committed
Updated PBL
1 parent 5d9ed07 commit cac8223

File tree

2 files changed

+24
-9
lines changed

2 files changed

+24
-9
lines changed

README.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,15 @@ yarn add blwebhooks@nightly
6262

6363
# Supported Lists
6464

65-
| Name | Features | UserID | BotID | Event Name |
66-
| --------------- | ------------------- | ------ | ----- | ----------- |
67-
| top.gg | `DATABASE`, `HOOKS` | true | true | topgg-voted |
68-
| InfinityBotList | `DATABASE`, `HOOKS` | true | true | IBL-voted |
69-
| VoidBots | `DATABASE`, `HOOKS` | true | true | VB-voted |
70-
| DiscordLabs | `DATABASE`, `HOOKS` | true | true | DL-voted |
71-
| Blist | `DATABASE`, `HOOKS` | true | true | BLT-voted |
72-
| DiscordBots.co | `DATABASE`, `HOOKS` | true | true | DBC-voted |
65+
| Name | Features | UserID | BotID | userName | Event Name |
66+
| --------------- | ------------------- | ------ | ----- | -------- | ----------- |
67+
| top.gg | `DATABASE`, `HOOKS` | true | true | false | topgg-voted |
68+
| InfinityBotList | `DATABASE`, `HOOKS` | true | true | false | IBL-voted |
69+
| VoidBots | `DATABASE`, `HOOKS` | true | true | false | VB-voted |
70+
| DiscordLabs | `DATABASE`, `HOOKS` | true | true | false | DL-voted |
71+
| Blist | `DATABASE`, `HOOKS` | true | true | false | BLT-voted |
72+
| DiscordBots.co | `DATABASE`, `HOOKS` | true | true | false | DBC-voted |
73+
| ParadiseBotList | `DATABASE`, `HOOKS` | true | true | true | PBL-voted |
7374

7475
# Future Lists
7576

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

294+
**ParadiseBotList Vote Hooks:**
295+
296+
```js
297+
// This will listen to votes from BList, the url is the end not
298+
// including the / and auth is the webhook auth. You can enable and
299+
// disable using true or false at the end
300+
client.voteManager.PBLVoteHook(url, auth, true);
301+
302+
// This code will run after a new vote was received from BList
303+
client.on("PBL-voted", async function (userID, botID, userName) {
304+
console.log(`${userName} (${userID}) Voted For <#${botID}>`);
305+
});
306+
```
307+
293308
# Events
294309

295310
**Global Voted Event**

src/Client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ class WebhooksManager extends EventEmitter {
280280
const userID = req.body.userID;
281281
const botID = req.body.bot;
282282
const userName = req.body.user;
283-
const type = req.body.type;
283+
const type = null;
284284
const List = "ParaiseBots";
285285
this.client.emit("PBL-voted", userID, botID, userName, type);
286286
this.client.emit("vote", userID, botID, List);

0 commit comments

Comments
 (0)