@fluxerjs/core 1.1.0 → 1.1.1
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/LICENSE +203 -0
- package/dist/{Channel-WJZZSNML.mjs → Channel-4WVFDOCG.mjs} +2 -1
- package/dist/{ClientUser-DJO2FS7P.mjs → ClientUser-PXAAKR2P.mjs} +1 -1
- package/dist/{Guild-2P77HBQM.mjs → Guild-FMBCTAV4.mjs} +2 -1
- package/dist/{MessageReaction-V4UZ7OXE.mjs → MessageReaction-AYSOCOMX.mjs} +2 -1
- package/dist/{chunk-JHNKZIHY.mjs → chunk-4F765HVV.mjs} +2 -2
- package/dist/{chunk-4XJIM6SC.mjs → chunk-FRVZ7D6D.mjs} +6 -28
- package/dist/{chunk-CEABHTAF.mjs → chunk-K6NLD6SB.mjs} +22 -1
- package/dist/{chunk-LU2SNC5G.mjs → chunk-RWFKZ3DF.mjs} +33 -12
- package/dist/chunk-V6T5VMWD.mjs +26 -0
- package/dist/index.js +283 -242
- package/dist/index.mjs +24 -19
- package/package.json +8 -8
package/dist/index.mjs
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
ErrorCodes,
|
|
3
|
-
FluxerError,
|
|
4
2
|
Guild
|
|
5
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FRVZ7D6D.mjs";
|
|
6
4
|
import {
|
|
7
5
|
MessageReaction
|
|
8
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-K6NLD6SB.mjs";
|
|
9
7
|
import {
|
|
10
8
|
ClientUser,
|
|
11
9
|
User
|
|
12
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4F765HVV.mjs";
|
|
13
11
|
import {
|
|
14
12
|
Message,
|
|
15
13
|
ReactionCollector
|
|
@@ -30,7 +28,11 @@ import {
|
|
|
30
28
|
MessageManager,
|
|
31
29
|
TextChannel,
|
|
32
30
|
VoiceChannel
|
|
33
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-RWFKZ3DF.mjs";
|
|
32
|
+
import {
|
|
33
|
+
ErrorCodes,
|
|
34
|
+
FluxerError
|
|
35
|
+
} from "./chunk-V6T5VMWD.mjs";
|
|
34
36
|
import {
|
|
35
37
|
Events
|
|
36
38
|
} from "./chunk-AH7KYH2Z.mjs";
|
|
@@ -91,7 +93,7 @@ var ChannelManager = class extends Collection {
|
|
|
91
93
|
const cached = this.get(channelId);
|
|
92
94
|
if (cached) return cached;
|
|
93
95
|
try {
|
|
94
|
-
const { Channel: Channel2 } = await import("./Channel-
|
|
96
|
+
const { Channel: Channel2 } = await import("./Channel-4WVFDOCG.mjs");
|
|
95
97
|
const data = await this.client.rest.get(
|
|
96
98
|
Routes.channel(channelId)
|
|
97
99
|
);
|
|
@@ -188,7 +190,7 @@ var GuildManager = class extends Collection2 {
|
|
|
188
190
|
const cached = this.get(guildId);
|
|
189
191
|
if (cached) return cached;
|
|
190
192
|
try {
|
|
191
|
-
const { Guild: Guild2 } = await import("./Guild-
|
|
193
|
+
const { Guild: Guild2 } = await import("./Guild-FMBCTAV4.mjs");
|
|
192
194
|
const data = await this.client.rest.get(
|
|
193
195
|
Routes2.guild(guildId)
|
|
194
196
|
);
|
|
@@ -235,7 +237,7 @@ handlers.set("MESSAGE_DELETE", async (client, d) => {
|
|
|
235
237
|
});
|
|
236
238
|
handlers.set("MESSAGE_REACTION_ADD", async (client, d) => {
|
|
237
239
|
const data = d;
|
|
238
|
-
const { MessageReaction: MessageReaction2 } = await import("./MessageReaction-
|
|
240
|
+
const { MessageReaction: MessageReaction2 } = await import("./MessageReaction-AYSOCOMX.mjs");
|
|
239
241
|
const reaction = new MessageReaction2(client, data);
|
|
240
242
|
const user = client.getOrCreateUser({
|
|
241
243
|
id: data.user_id,
|
|
@@ -254,7 +256,7 @@ handlers.set("MESSAGE_REACTION_ADD", async (client, d) => {
|
|
|
254
256
|
});
|
|
255
257
|
handlers.set("MESSAGE_REACTION_REMOVE", async (client, d) => {
|
|
256
258
|
const data = d;
|
|
257
|
-
const { MessageReaction: MessageReaction2 } = await import("./MessageReaction-
|
|
259
|
+
const { MessageReaction: MessageReaction2 } = await import("./MessageReaction-AYSOCOMX.mjs");
|
|
258
260
|
const reaction = new MessageReaction2(client, data);
|
|
259
261
|
const user = client.getOrCreateUser({
|
|
260
262
|
id: data.user_id,
|
|
@@ -281,8 +283,8 @@ handlers.set("MESSAGE_REACTION_REMOVE_EMOJI", async (client, d) => {
|
|
|
281
283
|
);
|
|
282
284
|
});
|
|
283
285
|
handlers.set("GUILD_CREATE", async (client, d) => {
|
|
284
|
-
const { Guild: Guild2 } = await import("./Guild-
|
|
285
|
-
const { Channel: Channel2 } = await import("./Channel-
|
|
286
|
+
const { Guild: Guild2 } = await import("./Guild-FMBCTAV4.mjs");
|
|
287
|
+
const { Channel: Channel2 } = await import("./Channel-4WVFDOCG.mjs");
|
|
286
288
|
const raw = d;
|
|
287
289
|
const guildData = raw?.properties != null ? { ...raw.properties, roles: raw.roles } : raw;
|
|
288
290
|
const guild = new Guild2(client, guildData);
|
|
@@ -298,7 +300,7 @@ handlers.set("GUILD_CREATE", async (client, d) => {
|
|
|
298
300
|
}
|
|
299
301
|
});
|
|
300
302
|
handlers.set("GUILD_UPDATE", async (client, d) => {
|
|
301
|
-
const { Guild: Guild2 } = await import("./Guild-
|
|
303
|
+
const { Guild: Guild2 } = await import("./Guild-FMBCTAV4.mjs");
|
|
302
304
|
const raw = d;
|
|
303
305
|
const guildData = raw?.properties != null ? { ...raw.properties, roles: raw.roles } : raw;
|
|
304
306
|
const old = client.guilds.get(guildData.id);
|
|
@@ -315,7 +317,7 @@ handlers.set("GUILD_DELETE", async (client, d) => {
|
|
|
315
317
|
}
|
|
316
318
|
});
|
|
317
319
|
handlers.set("CHANNEL_CREATE", async (client, d) => {
|
|
318
|
-
const { Channel: Channel2 } = await import("./Channel-
|
|
320
|
+
const { Channel: Channel2 } = await import("./Channel-4WVFDOCG.mjs");
|
|
319
321
|
const ch = Channel2.from(client, d);
|
|
320
322
|
if (ch) {
|
|
321
323
|
client.channels.set(ch.id, ch);
|
|
@@ -323,7 +325,7 @@ handlers.set("CHANNEL_CREATE", async (client, d) => {
|
|
|
323
325
|
}
|
|
324
326
|
});
|
|
325
327
|
handlers.set("CHANNEL_UPDATE", async (client, d) => {
|
|
326
|
-
const { Channel: Channel2 } = await import("./Channel-
|
|
328
|
+
const { Channel: Channel2 } = await import("./Channel-4WVFDOCG.mjs");
|
|
327
329
|
const ch = d;
|
|
328
330
|
const oldCh = client.channels.get(ch.id);
|
|
329
331
|
const newCh = Channel2.from(client, ch);
|
|
@@ -525,9 +527,12 @@ var Client = class extends EventEmitter {
|
|
|
525
527
|
if (typeof emoji === "object" && emoji.id) {
|
|
526
528
|
return formatEmoji({ name: emoji.name, id: emoji.id, animated: emoji.animated });
|
|
527
529
|
}
|
|
528
|
-
const parsed = parseEmoji(
|
|
530
|
+
const parsed = parseEmoji(
|
|
531
|
+
typeof emoji === "string" ? emoji : emoji.id ? `:${emoji.name}:` : emoji.name
|
|
532
|
+
);
|
|
529
533
|
if (!parsed) throw new Error("Invalid emoji");
|
|
530
534
|
if (parsed.id) return formatEmoji(parsed);
|
|
535
|
+
if (!/^\w+$/.test(parsed.name)) return encodeURIComponent(parsed.name);
|
|
531
536
|
if (guildId) {
|
|
532
537
|
const emojis = await this.rest.get(Routes3.guildEmojis(guildId));
|
|
533
538
|
const list = Array.isArray(emojis) ? emojis : Object.values(emojis ?? {});
|
|
@@ -646,9 +651,9 @@ var Client = class extends EventEmitter {
|
|
|
646
651
|
async ({
|
|
647
652
|
data
|
|
648
653
|
}) => {
|
|
649
|
-
const { ClientUser: ClientUser2 } = await import("./ClientUser-
|
|
650
|
-
const { Guild: Guild2 } = await import("./Guild-
|
|
651
|
-
const { Channel: Channel2 } = await import("./Channel-
|
|
654
|
+
const { ClientUser: ClientUser2 } = await import("./ClientUser-PXAAKR2P.mjs");
|
|
655
|
+
const { Guild: Guild2 } = await import("./Guild-FMBCTAV4.mjs");
|
|
656
|
+
const { Channel: Channel2 } = await import("./Channel-4WVFDOCG.mjs");
|
|
652
657
|
this.user = new ClientUser2(this, data.user);
|
|
653
658
|
for (const g of data.guilds ?? []) {
|
|
654
659
|
const guildData = g && typeof g === "object" && "properties" in g && g.properties ? {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.1.
|
|
6
|
+
"version": "1.1.1",
|
|
7
7
|
"description": "A fully-featured SDK for Fluxer bots",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"bot",
|
|
20
20
|
"api"
|
|
21
21
|
],
|
|
22
|
-
"license": "
|
|
22
|
+
"license": "Apache-2.0",
|
|
23
23
|
"main": "./dist/index.js",
|
|
24
24
|
"module": "./dist/index.mjs",
|
|
25
25
|
"types": "./dist/index.d.ts",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"dist"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@fluxerjs/
|
|
38
|
-
"@fluxerjs/
|
|
39
|
-
"@fluxerjs/
|
|
40
|
-
"@fluxerjs/builders": "1.1.
|
|
41
|
-
"@fluxerjs/util": "1.1.
|
|
42
|
-
"@fluxerjs/types": "1.1.
|
|
37
|
+
"@fluxerjs/rest": "1.1.1",
|
|
38
|
+
"@fluxerjs/ws": "1.1.1",
|
|
39
|
+
"@fluxerjs/collection": "1.1.1",
|
|
40
|
+
"@fluxerjs/builders": "1.1.1",
|
|
41
|
+
"@fluxerjs/util": "1.1.1",
|
|
42
|
+
"@fluxerjs/types": "1.1.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "^20.0.0",
|