catto.js 0.9.7 → 0.9.9
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/Bot.js +5 -2
- package/package.json +1 -1
- package/request.js +3 -0
package/Bot.js
CHANGED
|
@@ -22,7 +22,8 @@ module.exports = class extends EventEmitter {
|
|
|
22
22
|
"publicKey": "",
|
|
23
23
|
"debug": !1,
|
|
24
24
|
"mobile": !1,
|
|
25
|
-
"sharded": !1
|
|
25
|
+
"sharded": !1,
|
|
26
|
+
"partials": !1
|
|
26
27
|
}, options || {});
|
|
27
28
|
if (client) {
|
|
28
29
|
this.client = client;
|
|
@@ -35,11 +36,13 @@ module.exports = class extends EventEmitter {
|
|
|
35
36
|
}
|
|
36
37
|
var opts = {
|
|
37
38
|
"intents": new Discord.IntentsBitField(this.options.intents),
|
|
38
|
-
"partials": [Discord.Partials.Channel, Discord.Partials.GuildMember, Discord.Partials.GuildScheduledEvent, Discord.Partials.Message, Discord.Partials.Reaction, Discord.Partials.ThreadMember, Discord.Partials.User],
|
|
39
39
|
"rest": {
|
|
40
40
|
"version": this.options.apiv
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
+
if (this.options.partials) {
|
|
44
|
+
opts.partials = [Discord.Partials.Channel, Discord.Partials.GuildMember, Discord.Partials.GuildScheduledEvent, Discord.Partials.Message, Discord.Partials.Reaction, Discord.Partials.ThreadMember, Discord.Partials.User];
|
|
45
|
+
}
|
|
43
46
|
if (this.options.sharded) {
|
|
44
47
|
opts.shards = getInfo().SHARD_LIST;
|
|
45
48
|
opts.shardCount = getInfo().TOTAL_SHARDS;
|
package/package.json
CHANGED
package/request.js
CHANGED
|
@@ -7,6 +7,9 @@ if (!globalThis.fetch) {
|
|
|
7
7
|
globalThis.Request = Request;
|
|
8
8
|
globalThis.Response = Response;
|
|
9
9
|
}
|
|
10
|
+
if (globalThis.fetch && typeof fetch === "undefined") {
|
|
11
|
+
var fetch = globalThis.fetch;
|
|
12
|
+
}
|
|
10
13
|
|
|
11
14
|
function wrap(method, options) {
|
|
12
15
|
var options2 = Object.assign({}, options);
|