seyfert 2.1.1-dev-11992998621.0 → 2.1.1-dev-12133320614.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/cache/index.d.ts +1 -1
- package/lib/client/collectors.js +17 -7
- package/lib/client/transformers.d.ts +1 -3
- package/lib/client/transformers.js +2 -4
- package/lib/common/it/utils.d.ts +1 -1
- package/lib/common/shorters/application.d.ts +2 -2
- package/lib/common/shorters/bans.d.ts +2 -2
- package/lib/events/handler.js +17 -7
- package/lib/events/hooks/entitlement.d.ts +3 -3
- package/lib/structures/Guild.d.ts +2 -2
- package/lib/structures/Interaction.d.ts +1 -1
- package/lib/structures/channels.d.ts +1 -1
- package/lib/structures/index.d.ts +2 -0
- package/lib/structures/index.js +2 -0
- package/lib/websocket/discord/shard.js +2 -2
- package/package.json +6 -6
package/lib/cache/index.d.ts
CHANGED
package/lib/client/collectors.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.Collectors = void 0;
|
|
27
37
|
const node_crypto_1 = require("node:crypto");
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { type CustomStructures, OptionResolver } from '../commands';
|
|
2
2
|
import type { StructStates } from '../common/';
|
|
3
|
-
import { AnonymousGuild, AutoModerationRule, BaseChannel, BaseGuildChannel, CategoryChannel, ClientUser, DMChannel, DirectoryChannel, ForumChannel, Guild, GuildEmoji, GuildMember, GuildRole, GuildTemplate, InteractionGuildMember, MediaChannel, Message, NewsChannel, Poll, StageChannel, Sticker, TextGuildChannel, ThreadChannel, User, VoiceChannel, VoiceState, Webhook, WebhookMessage } from '../structures';
|
|
4
|
-
import { Entitlement } from '../structures/Entitlement';
|
|
5
|
-
import { GuildBan } from '../structures/GuildBan';
|
|
3
|
+
import { AnonymousGuild, AutoModerationRule, BaseChannel, BaseGuildChannel, CategoryChannel, ClientUser, DMChannel, DirectoryChannel, Entitlement, ForumChannel, Guild, GuildBan, GuildEmoji, GuildMember, GuildRole, GuildTemplate, InteractionGuildMember, MediaChannel, Message, NewsChannel, Poll, StageChannel, Sticker, TextGuildChannel, ThreadChannel, User, VoiceChannel, VoiceState, Webhook, WebhookMessage } from '../structures';
|
|
6
4
|
import type { ChannelType } from '../types';
|
|
7
5
|
export type PollStructure = InferCustomStructure<Poll, 'Poll'>;
|
|
8
6
|
export type ClientUserStructure = InferCustomStructure<ClientUser, 'ClientUser'>;
|
|
@@ -3,8 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Transformers = void 0;
|
|
4
4
|
const commands_1 = require("../commands");
|
|
5
5
|
const structures_1 = require("../structures");
|
|
6
|
-
const Entitlement_1 = require("../structures/Entitlement");
|
|
7
|
-
const GuildBan_1 = require("../structures/GuildBan");
|
|
8
6
|
exports.Transformers = {
|
|
9
7
|
AnonymousGuild(...args) {
|
|
10
8
|
return new structures_1.AnonymousGuild(...args);
|
|
@@ -55,7 +53,7 @@ exports.Transformers = {
|
|
|
55
53
|
return new structures_1.Guild(...args);
|
|
56
54
|
},
|
|
57
55
|
GuildBan(...args) {
|
|
58
|
-
return new
|
|
56
|
+
return new structures_1.GuildBan(...args);
|
|
59
57
|
},
|
|
60
58
|
GuildEmoji(...args) {
|
|
61
59
|
return new structures_1.GuildEmoji(...args);
|
|
@@ -97,6 +95,6 @@ exports.Transformers = {
|
|
|
97
95
|
return new commands_1.OptionResolver(...args);
|
|
98
96
|
},
|
|
99
97
|
Entitlement(...args) {
|
|
100
|
-
return new
|
|
98
|
+
return new structures_1.Entitlement(...args);
|
|
101
99
|
},
|
|
102
100
|
};
|
package/lib/common/it/utils.d.ts
CHANGED
|
@@ -119,4 +119,4 @@ 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
121
|
export declare function toArrayBuffer(buffer: Buffer): ArrayBuffer;
|
|
122
|
-
export declare function toBuffer(arrayBuffer: ArrayBuffer): Buffer
|
|
122
|
+
export declare function toBuffer(arrayBuffer: ArrayBuffer): Buffer<ArrayBuffer>;
|
|
@@ -27,7 +27,7 @@ export declare class ApplicationShorter extends BaseShorter {
|
|
|
27
27
|
* @param applicationId The ID of the application.
|
|
28
28
|
* @param [query] The query parameters.
|
|
29
29
|
*/
|
|
30
|
-
listEntitlements(applicationId: string, query?: RESTGetAPIEntitlementsQuery): Promise<import("
|
|
30
|
+
listEntitlements(applicationId: string, query?: RESTGetAPIEntitlementsQuery): Promise<import("../..").Entitlement[]>;
|
|
31
31
|
/**
|
|
32
32
|
* Consumes an entitlement for the application.
|
|
33
33
|
* @param applicationId The ID of the application.
|
|
@@ -39,7 +39,7 @@ export declare class ApplicationShorter extends BaseShorter {
|
|
|
39
39
|
* @param applicationId The ID of the application.
|
|
40
40
|
* @param body The body of the request.
|
|
41
41
|
*/
|
|
42
|
-
createTestEntitlement(applicationId: string, body: RESTPostAPIEntitlementBody): Promise<import("
|
|
42
|
+
createTestEntitlement(applicationId: string, body: RESTPostAPIEntitlementBody): Promise<import("../..").Entitlement>;
|
|
43
43
|
/**
|
|
44
44
|
* Deletes a test entitlement for the application.
|
|
45
45
|
* @param applicationId The ID of the application.
|
|
@@ -30,7 +30,7 @@ export declare class BanShorter extends BaseShorter {
|
|
|
30
30
|
* @param force Whether to force fetching the ban from the API even if it exists in the cache.
|
|
31
31
|
* @returns A Promise that resolves to the fetched ban.
|
|
32
32
|
*/
|
|
33
|
-
fetch(guildId: string, userId: string, force?: boolean): Promise<import("
|
|
33
|
+
fetch(guildId: string, userId: string, force?: boolean): Promise<import("../..").GuildBan>;
|
|
34
34
|
/**
|
|
35
35
|
* Lists bans in the guild based on the provided query.
|
|
36
36
|
* @param guildId The ID of the guild.
|
|
@@ -38,5 +38,5 @@ export declare class BanShorter extends BaseShorter {
|
|
|
38
38
|
* @param force Whether to force listing bans from the API even if they exist in the cache.
|
|
39
39
|
* @returns A Promise that resolves to an array of listed bans.
|
|
40
40
|
*/
|
|
41
|
-
list(guildId: string, query?: RESTGetAPIGuildBansQuery, force?: boolean): Promise<import("
|
|
41
|
+
list(guildId: string, query?: RESTGetAPIGuildBansQuery, force?: boolean): Promise<import("../..").GuildBan[]>;
|
|
42
42
|
}
|
package/lib/events/handler.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.EventHandler = void 0;
|
|
27
37
|
const common_1 = require("../common");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UsingClient } from '../../commands';
|
|
2
2
|
import type { APIEntitlement } from '../../types';
|
|
3
|
-
export declare const ENTITLEMENT_CREATE: (client: UsingClient, data: APIEntitlement) => import("
|
|
4
|
-
export declare const ENTITLEMENT_UPDATE: (client: UsingClient, data: APIEntitlement) => import("
|
|
5
|
-
export declare const ENTITLEMENT_DELETE: (client: UsingClient, data: APIEntitlement) => import("
|
|
3
|
+
export declare const ENTITLEMENT_CREATE: (client: UsingClient, data: APIEntitlement) => import("../..").Entitlement;
|
|
4
|
+
export declare const ENTITLEMENT_UPDATE: (client: UsingClient, data: APIEntitlement) => import("../..").Entitlement;
|
|
5
|
+
export declare const ENTITLEMENT_DELETE: (client: UsingClient, data: APIEntitlement) => import("../..").Entitlement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { UsingClient } from '../commands';
|
|
2
2
|
import type { ObjectToLower, StructPropState, StructStates, ToClass } from '../common/types/util';
|
|
3
|
-
import type { APIGuild, GatewayGuildCreateDispatchData, RESTPatchAPIGuildJSONBody } from '../types';
|
|
3
|
+
import type { APIGuild, APIPartialGuild, GatewayGuildCreateDispatchData, RESTPatchAPIGuildJSONBody } from '../types';
|
|
4
4
|
import { AutoModerationRule } from './AutoModerationRule';
|
|
5
5
|
import { GuildBan } from './GuildBan';
|
|
6
6
|
import { GuildEmoji } from './GuildEmoji';
|
|
@@ -13,7 +13,7 @@ import { BaseGuild } from './extra/BaseGuild';
|
|
|
13
13
|
import type { DiscordBase } from './extra/DiscordBase';
|
|
14
14
|
export interface Guild extends ObjectToLower<Omit<APIGuild, 'stickers' | 'emojis' | 'roles'>>, DiscordBase {
|
|
15
15
|
}
|
|
16
|
-
declare const Guild_base: ToClass<Omit<BaseGuild,
|
|
16
|
+
declare const Guild_base: ToClass<Omit<BaseGuild, keyof ObjectToLower<APIPartialGuild>>, Guild>;
|
|
17
17
|
export declare class Guild<State extends StructStates = 'api'> extends Guild_base {
|
|
18
18
|
joinedAt: StructPropState<number, State, 'create'>;
|
|
19
19
|
memberCount: StructPropState<number, State, 'create'>;
|
|
@@ -125,7 +125,7 @@ export declare class SelectMenuInteraction extends ComponentInteraction {
|
|
|
125
125
|
constructor(client: UsingClient, interaction: APIMessageComponentSelectMenuInteraction, __reply?: __InternalReplyFunction | undefined);
|
|
126
126
|
get values(): string[];
|
|
127
127
|
}
|
|
128
|
-
declare const StringSelectMenuInteraction_base: ToClass<Omit<SelectMenuInteraction, "data" | "isStringSelectMenu">, StringSelectMenuInteraction
|
|
128
|
+
declare const StringSelectMenuInteraction_base: ToClass<Omit<SelectMenuInteraction, "data" | "isStringSelectMenu">, StringSelectMenuInteraction>;
|
|
129
129
|
export declare class StringSelectMenuInteraction<T extends any[] = string[]> extends StringSelectMenuInteraction_base {
|
|
130
130
|
data: OmitInsert<ObjectToLower<APIMessageStringSelectInteractionData>, 'values', {
|
|
131
131
|
values: T;
|
|
@@ -268,7 +268,7 @@ export declare class ThreadChannel extends BaseChannel<ChannelType.PublicThread
|
|
|
268
268
|
}
|
|
269
269
|
export interface CategoryChannel extends ObjectToLower<Omit<APIGuildCategoryChannel, 'permission_overwrites'>> {
|
|
270
270
|
}
|
|
271
|
-
declare const CategoryChannel_base: ToClass<Omit<BaseGuildChannel, "
|
|
271
|
+
declare const CategoryChannel_base: ToClass<Omit<BaseGuildChannel, "setParent" | "type">, CategoryChannel>;
|
|
272
272
|
export declare class CategoryChannel extends CategoryChannel_base {
|
|
273
273
|
type: ChannelType.GuildCategory;
|
|
274
274
|
}
|
package/lib/structures/index.js
CHANGED
|
@@ -31,3 +31,5 @@ __exportStar(require("./VoiceState"), exports);
|
|
|
31
31
|
__exportStar(require("./Webhook"), exports);
|
|
32
32
|
__exportStar(require("./channels"), exports);
|
|
33
33
|
__exportStar(require("./Poll"), exports);
|
|
34
|
+
__exportStar(require("./GuildBan"), exports);
|
|
35
|
+
__exportStar(require("./Entitlement"), exports);
|
|
@@ -27,13 +27,13 @@ class Shard {
|
|
|
27
27
|
options;
|
|
28
28
|
constructor(id, options) {
|
|
29
29
|
this.id = id;
|
|
30
|
-
this.options = (0, common_1.MergeOptions)(
|
|
30
|
+
this.options = (0, common_1.MergeOptions)({
|
|
31
31
|
properties: constants_1.properties,
|
|
32
32
|
ratelimitOptions: {
|
|
33
33
|
rateLimitResetInterval: 60_000,
|
|
34
34
|
maxRequestsPerRateLimitTick: 120,
|
|
35
35
|
},
|
|
36
|
-
});
|
|
36
|
+
}, options);
|
|
37
37
|
this.logger = new common_1.Logger({
|
|
38
38
|
name: `[Shard #${id}]`,
|
|
39
39
|
logLevel: common_1.LogLevels.Info,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "seyfert",
|
|
3
|
-
"version": "2.1.1-dev-
|
|
3
|
+
"version": "2.1.1-dev-12133320614.0",
|
|
4
4
|
"description": "The most advanced framework for discord bots",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib/index.js",
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@biomejs/biome": "1.9.4",
|
|
25
|
-
"@commitlint/cli": "^19.
|
|
26
|
-
"@commitlint/config-conventional": "^19.
|
|
27
|
-
"@types/node": "^22.
|
|
25
|
+
"@commitlint/cli": "^19.6.0",
|
|
26
|
+
"@commitlint/config-conventional": "^19.6.0",
|
|
27
|
+
"@types/node": "^22.10.1",
|
|
28
28
|
"husky": "^9.1.7",
|
|
29
29
|
"lint-staged": "^15.2.10",
|
|
30
|
-
"typescript": "^5.
|
|
31
|
-
"vitest": "^2.1.
|
|
30
|
+
"typescript": "^5.7.2",
|
|
31
|
+
"vitest": "^2.1.8"
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://seyfert.dev",
|
|
34
34
|
"repository": {
|