catto.js 1.0.3 → 1.0.4
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/MessageBuilder.js +7 -0
- package/Server.js +0 -1
- package/User.js +1 -4
- package/activity-sdk.js +9795 -0
- package/package.json +1 -1
package/MessageBuilder.js
CHANGED
|
@@ -131,5 +131,12 @@ class MessageBuilder {
|
|
|
131
131
|
throw new Error("Message can't have more than 10 embeds.");
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
+
file(d) {
|
|
135
|
+
if (!this.data.files) {
|
|
136
|
+
this.data.files = [];
|
|
137
|
+
}
|
|
138
|
+
this.data.files.push(d);
|
|
139
|
+
return this;
|
|
140
|
+
}
|
|
134
141
|
}
|
|
135
142
|
module.exports = MessageBuilder;
|
package/Server.js
CHANGED
package/User.js
CHANGED
|
@@ -241,10 +241,7 @@ module.exports = class {
|
|
|
241
241
|
async requestApplication() {
|
|
242
242
|
if (this.isBot) {
|
|
243
243
|
this.application = new Application((await request.get({
|
|
244
|
-
"url": `https://discord.com/api/v${(this.bot ? (this.bot.client.rest.version ? this.bot.client.rest.version.toString() : "10") : "10")}/oauth2/applications/${this.id}/rpc
|
|
245
|
-
"headers": {
|
|
246
|
-
"Authorization": `Bot ${this.bot.client.token}`
|
|
247
|
-
}
|
|
244
|
+
"url": `https://discord.com/api/v${(this.bot ? (this.bot.client.rest.version ? this.bot.client.rest.version.toString() : "10") : "10")}/oauth2/applications/${this.id}/rpc`
|
|
248
245
|
})).body);
|
|
249
246
|
}
|
|
250
247
|
}
|