catto.js 0.4.4 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Application.js +10 -3
- package/User.js +6 -2
- package/package.json +1 -1
package/Application.js
CHANGED
|
@@ -144,7 +144,7 @@ module.exports = class {
|
|
|
144
144
|
null,
|
|
145
145
|
null,
|
|
146
146
|
null,
|
|
147
|
-
|
|
147
|
+
"APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE",
|
|
148
148
|
null,
|
|
149
149
|
null,
|
|
150
150
|
null,
|
|
@@ -201,10 +201,17 @@ module.exports = class {
|
|
|
201
201
|
return this.badges.has("EMBEDDED");
|
|
202
202
|
}
|
|
203
203
|
/**
|
|
204
|
-
* Gets a boolean indicating if the application supports the slash
|
|
205
|
-
* @returns {boolean} A boolean indicating if the application supports the slash
|
|
204
|
+
* Gets a boolean indicating if the application supports the slash commands.
|
|
205
|
+
* @returns {boolean} A boolean indicating if the application supports the slash commands.
|
|
206
206
|
*/
|
|
207
207
|
get supportsSlash() {
|
|
208
208
|
return this.badges.has("APPLICATION_COMMAND_BADGE");
|
|
209
209
|
}
|
|
210
|
+
/**
|
|
211
|
+
* Gets a boolean indicating if the application uses automod.
|
|
212
|
+
* @returns {boolean} A boolean indicating if the application uses automod.
|
|
213
|
+
*/
|
|
214
|
+
get supportsAutomod() {
|
|
215
|
+
return this.badges.has("APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE");
|
|
216
|
+
}
|
|
210
217
|
};
|
package/User.js
CHANGED
|
@@ -20,6 +20,9 @@ module.exports = class {
|
|
|
20
20
|
if (options.premium_type) {
|
|
21
21
|
options.premiumType = options.premium_type;
|
|
22
22
|
}
|
|
23
|
+
if (options.avatar_decoration_data) {
|
|
24
|
+
options.avatarDecorationData = options.avatar_decoration_data;
|
|
25
|
+
}
|
|
23
26
|
this.options = Object.assign({
|
|
24
27
|
"id": "",
|
|
25
28
|
"globalName": "",
|
|
@@ -37,7 +40,8 @@ module.exports = class {
|
|
|
37
40
|
"email": "",
|
|
38
41
|
"verified": !1,
|
|
39
42
|
"bot": !1,
|
|
40
|
-
"system": !1
|
|
43
|
+
"system": !1,
|
|
44
|
+
"avatarDecorationData": {}
|
|
41
45
|
}, options || {});
|
|
42
46
|
this.bot = bot;
|
|
43
47
|
}
|
|
@@ -51,7 +55,7 @@ module.exports = class {
|
|
|
51
55
|
return this.options.username;
|
|
52
56
|
}
|
|
53
57
|
get decorationHash() {
|
|
54
|
-
return this.options.
|
|
58
|
+
return (this.options.avatarDecorationData ? this.options.avatarDecorationData.asset : null);
|
|
55
59
|
}
|
|
56
60
|
get decoration() {
|
|
57
61
|
return `https://cdn.discordapp.com/avatar-decoration-presets/${this.decorationHash}.png`;
|