-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathBadges.plugin.js
49 lines (44 loc) · 1.64 KB
/
Badges.plugin.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/**
* @name Badges
* @author John Fries
* @authorId 630070645874622494
* @version 1.0.2
* @description Simple plugin that gives you all badges
* @website https://johnfries.net
* @updateUrl https://github.com/John-Fries-J/Badges-plugin/blob/068ee722c9e1416afdde0fc119a5156e9d6d5a21/Badges.plugin.js
* @source https://github.com/John-Fries-J/Badges-plugin
* @invite pqXYh3PQtk
*/
const settingsStore = BdApi.findModule(m => typeof m?.default?.isDeveloper !== "undefined");
const userStore = BdApi.findModule(m => m?.default?.getUsers);
module.exports = class {
getName() {
return "Discord Badges";
}
start = () => {
(() => {
let flags = {
"DISCORD_EMPLOYEE": 1 << 0,
"DISCORD_PARTNER": 1 << 1,
"HYPESQUAD_EVENTS": 1 << 2,
"BUG_HUNTER_LEVEL_1": 1 << 3,
"HOUSE_BRAVERY": 1 << 6,
"HOUSE_BRILLIANCE": 1 << 7,
"HOUSE_BALANCE": 1 << 8,
"EARLY_SUPPORTER": 1 << 9,
"BUG_HUNTER_LEVEL_2": 1 << 14,
"VERIFIED_BOT_DEVELOPER": 1 << 17,
"CERTIFIED_MODERATOR": 1 << 18
};
webpackChunkdiscord_app.push([[Math.random()], {}, req => {
for (const m of Object.keys(req.c).map(x => req.c[x].exports).filter(x => x)) {
if (m.default && m.default.getCurrentUser !== undefined) {
return m.default.getCurrentUser().flags = Object.values(flags).reduce((pre, cur) => pre + cur, 0);
}
}
}]);
})();
}
stop() {
}
}