seyfert 3.2.5-dev-16579482848.0 → 3.2.6-dev-16677502489.0
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/lib/api/api.js +8 -1
- package/lib/client/base.js +11 -1
- package/lib/common/it/utils.d.ts +1 -1
- package/package.json +5 -5
package/lib/api/api.js
CHANGED
|
@@ -329,7 +329,14 @@ class ApiHandler {
|
|
|
329
329
|
for (const [index, file] of options.request.files.entries()) {
|
|
330
330
|
const fileKey = file.key ?? `files[${index}]`;
|
|
331
331
|
if ((0, utils_2.isBufferLike)(file.data)) {
|
|
332
|
-
|
|
332
|
+
let data;
|
|
333
|
+
if (Buffer.isBuffer(file.data) || file.data instanceof Uint8Array || file.data instanceof Uint8ClampedArray) {
|
|
334
|
+
data = (0, utils_1.toArrayBuffer)(file.data);
|
|
335
|
+
}
|
|
336
|
+
else {
|
|
337
|
+
data = file.data;
|
|
338
|
+
}
|
|
339
|
+
formData.append(fileKey, new Blob([data], { type: file.contentType }), file.filename);
|
|
333
340
|
}
|
|
334
341
|
else {
|
|
335
342
|
formData.append(fileKey, new Blob([`${file.data}`], { type: file.contentType }), file.filename);
|
package/lib/client/base.js
CHANGED
|
@@ -10,6 +10,7 @@ const shared_1 = require("../commands/applications/shared");
|
|
|
10
10
|
const handle_1 = require("../commands/handle");
|
|
11
11
|
const handler_1 = require("../commands/handler");
|
|
12
12
|
const common_1 = require("../common");
|
|
13
|
+
const utils_2 = require("../common/it/utils");
|
|
13
14
|
const bans_1 = require("../common/shorters/bans");
|
|
14
15
|
const soundboard_1 = require("../common/shorters/soundboard");
|
|
15
16
|
const voiceStates_1 = require("../common/shorters/voiceStates");
|
|
@@ -215,7 +216,16 @@ class BaseClient {
|
|
|
215
216
|
for (const [index, file] of files.entries()) {
|
|
216
217
|
const fileKey = file.key ?? `files[${index}]`;
|
|
217
218
|
if ((0, utils_1.isBufferLike)(file.data)) {
|
|
218
|
-
|
|
219
|
+
let data;
|
|
220
|
+
if (Buffer.isBuffer(file.data) ||
|
|
221
|
+
file.data instanceof Uint8Array ||
|
|
222
|
+
file.data instanceof Uint8ClampedArray) {
|
|
223
|
+
data = (0, utils_2.toArrayBuffer)(file.data);
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
data = file.data;
|
|
227
|
+
}
|
|
228
|
+
response.append(fileKey, new Blob([data], { type: file.contentType }), file.filename);
|
|
219
229
|
}
|
|
220
230
|
else {
|
|
221
231
|
response.append(fileKey, new Blob([`${file.data}`], { type: file.contentType }), file.filename);
|
package/lib/common/it/utils.d.ts
CHANGED
|
@@ -118,6 +118,6 @@ export declare function resolveEmoji(emoji: EmojiResolvable, cache: Cache): Prom
|
|
|
118
118
|
export declare function encodeEmoji(rawEmoji: APIPartialEmoji): string;
|
|
119
119
|
export declare function hasProps<T extends Record<any, any>>(target: T, props: TypeArray<keyof T>): boolean;
|
|
120
120
|
export declare function hasIntent(intents: number, target: keyof typeof GatewayIntentBits | GatewayIntentBits): boolean;
|
|
121
|
-
export declare function toArrayBuffer(buffer: Buffer): ArrayBuffer;
|
|
121
|
+
export declare function toArrayBuffer(buffer: Buffer | Uint8ClampedArray | Uint8Array): ArrayBuffer;
|
|
122
122
|
export declare function toBuffer(arrayBuffer: ArrayBuffer): Buffer<ArrayBuffer>;
|
|
123
123
|
export declare function assertString(value: unknown, message?: string): asserts value is string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "seyfert",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.6-dev-16677502489.0",
|
|
4
4
|
"description": "The most advanced framework for discord bots",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib/index.js",
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
"author": "MARCROCK22",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@biomejs/biome": "2.
|
|
25
|
-
"@changesets/cli": "^2.29.
|
|
24
|
+
"@biomejs/biome": "2.1.3",
|
|
25
|
+
"@changesets/cli": "^2.29.5",
|
|
26
26
|
"@commitlint/cli": "^19.8.1",
|
|
27
27
|
"@commitlint/config-conventional": "^19.8.1",
|
|
28
|
-
"@types/node": "^24.0
|
|
28
|
+
"@types/node": "^24.1.0",
|
|
29
29
|
"husky": "^9.1.7",
|
|
30
|
-
"typescript": "^5.
|
|
30
|
+
"typescript": "^5.9.2",
|
|
31
31
|
"vitest": "^3.2.4"
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://seyfert.dev",
|