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 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
@@ -1,7 +1,6 @@
1
1
  var events = require("events");
2
2
  var express = require("express");
3
3
  var expressWs = require("express-ws");
4
- var fs = require("fs");
5
4
  var vm = require("vm");
6
5
  var http = require("http");
7
6
  var https = require("https");
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
  }