seyfert 2.0.0 → 2.1.1-dev-11310514874.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/Router.d.ts +2 -2
- package/lib/api/Router.js +2 -1
- package/lib/api/Routes/applications.d.ts +29 -30
- package/lib/api/Routes/cdn.d.ts +6 -1
- package/lib/api/Routes/channels.d.ts +44 -45
- package/lib/api/Routes/gateway.d.ts +3 -4
- package/lib/api/Routes/guilds.d.ts +81 -80
- package/lib/api/Routes/index.d.ts +3 -1
- package/lib/api/Routes/interactions.d.ts +9 -3
- package/lib/api/Routes/invites.d.ts +3 -4
- package/lib/api/Routes/skus.d.ts +10 -0
- package/lib/api/Routes/skus.js +2 -0
- package/lib/api/Routes/soundboard.d.ts +23 -0
- package/lib/api/Routes/soundboard.js +2 -0
- package/lib/api/Routes/stage-instances.d.ts +5 -6
- package/lib/api/Routes/stickers.d.ts +3 -4
- package/lib/api/Routes/users.d.ts +11 -12
- package/lib/api/Routes/voice.d.ts +2 -3
- package/lib/api/Routes/webhooks.d.ts +16 -15
- package/lib/api/api.d.ts +17 -11
- package/lib/api/api.js +26 -22
- package/lib/api/shared.d.ts +2 -2
- package/lib/api/utils/constants.d.ts +3 -1
- package/lib/api/utils/constants.js +3 -2
- package/lib/builders/ActionRow.d.ts +1 -1
- package/lib/builders/Attachment.d.ts +3 -3
- package/lib/builders/Attachment.js +13 -13
- package/lib/builders/Button.d.ts +1 -1
- package/lib/builders/Button.js +1 -1
- package/lib/builders/Embed.d.ts +1 -1
- package/lib/builders/Embed.js +2 -2
- package/lib/builders/Modal.d.ts +1 -1
- package/lib/builders/Poll.d.ts +1 -1
- package/lib/builders/Poll.js +1 -1
- package/lib/builders/SelectMenu.d.ts +1 -1
- package/lib/builders/SelectMenu.js +1 -1
- package/lib/builders/types.d.ts +2 -1
- package/lib/cache/adapters/default.js +5 -3
- package/lib/cache/adapters/limited.d.ts +1 -2
- package/lib/cache/adapters/limited.js +34 -30
- package/lib/cache/adapters/workeradapter.js +3 -1
- package/lib/cache/index.d.ts +12 -12
- package/lib/cache/index.js +48 -39
- package/lib/cache/resources/bans.d.ts +2 -2
- package/lib/cache/resources/bans.js +1 -1
- package/lib/cache/resources/channels.d.ts +1 -1
- package/lib/cache/resources/default/guild-related.d.ts +1 -2
- package/lib/cache/resources/emojis.d.ts +2 -2
- package/lib/cache/resources/emojis.js +1 -1
- package/lib/cache/resources/guilds.d.ts +2 -2
- package/lib/cache/resources/guilds.js +7 -11
- package/lib/cache/resources/members.d.ts +2 -2
- package/lib/cache/resources/members.js +1 -1
- package/lib/cache/resources/messages.d.ts +2 -2
- package/lib/cache/resources/messages.js +3 -3
- package/lib/cache/resources/overwrites.d.ts +1 -1
- package/lib/cache/resources/roles.d.ts +2 -2
- package/lib/cache/resources/roles.js +1 -1
- package/lib/cache/resources/stickers.d.ts +2 -2
- package/lib/cache/resources/stickers.js +1 -1
- package/lib/cache/resources/users.d.ts +2 -2
- package/lib/cache/resources/users.js +1 -1
- package/lib/cache/resources/voice-states.d.ts +2 -2
- package/lib/cache/resources/voice-states.js +1 -1
- package/lib/client/base.d.ts +10 -15
- package/lib/client/base.js +48 -44
- package/lib/client/client.d.ts +4 -4
- package/lib/client/client.js +37 -38
- package/lib/client/collectors.js +1 -1
- package/lib/client/httpclient.d.ts +1 -1
- package/lib/client/httpclient.js +2 -2
- package/lib/client/transformers.d.ts +37 -34
- package/lib/client/transformers.js +66 -63
- package/lib/client/workerclient.d.ts +13 -13
- package/lib/client/workerclient.js +182 -65
- package/lib/collection.d.ts +3 -3
- package/lib/commands/applications/chat.d.ts +3 -3
- package/lib/commands/applications/chat.js +5 -6
- package/lib/commands/applications/chatcontext.d.ts +6 -6
- package/lib/commands/applications/chatcontext.js +16 -8
- package/lib/commands/applications/entryPoint.d.ts +46 -0
- package/lib/commands/applications/entryPoint.js +56 -0
- package/lib/commands/applications/entrycontext.d.ts +40 -0
- package/lib/commands/applications/entrycontext.js +85 -0
- package/lib/commands/applications/menu.d.ts +1 -1
- package/lib/commands/applications/menucontext.d.ts +5 -5
- package/lib/commands/applications/menucontext.js +6 -6
- package/lib/commands/applications/options.d.ts +7 -6
- package/lib/commands/applications/shared.d.ts +5 -2
- package/lib/commands/basecontext.d.ts +1 -1
- package/lib/commands/decorators.d.ts +20 -26
- package/lib/commands/decorators.js +8 -4
- package/lib/commands/handle.d.ts +13 -12
- package/lib/commands/handle.js +133 -65
- package/lib/commands/handler.d.ts +9 -7
- package/lib/commands/handler.js +27 -18
- package/lib/commands/index.d.ts +2 -0
- package/lib/commands/index.js +2 -0
- package/lib/commands/optionresolver.d.ts +4 -4
- package/lib/commands/optionresolver.js +4 -4
- package/lib/common/bot/watcher.d.ts +1 -1
- package/lib/common/it/formatter.d.ts +21 -21
- package/lib/common/it/formatter.js +40 -41
- package/lib/common/it/logger.js +1 -1
- package/lib/common/it/utils.d.ts +14 -6
- package/lib/common/it/utils.js +62 -27
- package/lib/common/shorters/application.d.ts +2 -3
- package/lib/common/shorters/application.js +3 -3
- package/lib/common/shorters/bans.js +1 -1
- package/lib/common/shorters/channels.d.ts +3 -3
- package/lib/common/shorters/channels.js +3 -3
- package/lib/common/shorters/emojis.js +4 -4
- package/lib/common/shorters/guilds.d.ts +3 -3
- package/lib/common/shorters/guilds.js +5 -9
- package/lib/common/shorters/interaction.d.ts +3 -3
- package/lib/common/shorters/interaction.js +6 -5
- package/lib/common/shorters/members.d.ts +4 -5
- package/lib/common/shorters/members.js +6 -7
- package/lib/common/shorters/messages.d.ts +1 -1
- package/lib/common/shorters/messages.js +4 -4
- package/lib/common/shorters/reactions.d.ts +1 -1
- package/lib/common/shorters/reactions.js +1 -1
- package/lib/common/shorters/roles.js +1 -1
- package/lib/common/shorters/templates.js +2 -2
- package/lib/common/shorters/threads.d.ts +1 -1
- package/lib/common/shorters/threads.js +17 -11
- package/lib/common/shorters/webhook.d.ts +1 -1
- package/lib/common/shorters/webhook.js +4 -4
- package/lib/common/types/options.d.ts +2 -2
- package/lib/common/types/resolvables.d.ts +1 -1
- package/lib/common/types/util.d.ts +4 -1
- package/lib/common/types/write.d.ts +3 -3
- package/lib/components/BaseComponent.js +1 -1
- package/lib/components/ButtonComponent.d.ts +1 -1
- package/lib/components/componentcommand.d.ts +1 -1
- package/lib/components/componentcontext.d.ts +4 -4
- package/lib/components/componentcontext.js +1 -1
- package/lib/components/handler.d.ts +10 -8
- package/lib/components/handler.js +16 -13
- package/lib/components/index.js +2 -1
- package/lib/components/modalcontext.d.ts +2 -2
- package/lib/components/modalcontext.js +1 -1
- package/lib/deps/mixer.d.ts +1 -1
- package/lib/deps/mixer.js +6 -1
- package/lib/events/handler.d.ts +5 -5
- package/lib/events/handler.js +69 -19
- package/lib/events/hooks/application_command.d.ts +1 -1
- package/lib/events/hooks/auto_moderation.d.ts +1 -1
- package/lib/events/hooks/auto_moderation.js +1 -1
- package/lib/events/hooks/channel.d.ts +1 -1
- package/lib/events/hooks/custom.d.ts +1 -0
- package/lib/events/hooks/custom.js +5 -1
- package/lib/events/hooks/dispatch.d.ts +1 -1
- package/lib/events/hooks/entitlement.d.ts +4 -5
- package/lib/events/hooks/entitlement.js +4 -4
- package/lib/events/hooks/guild.d.ts +3 -3
- package/lib/events/hooks/guild.js +1 -1
- package/lib/events/hooks/index.d.ts +1 -0
- package/lib/events/hooks/index.js +1 -0
- package/lib/events/hooks/integration.d.ts +1 -1
- package/lib/events/hooks/integration.js +1 -1
- package/lib/events/hooks/interactions.d.ts +3 -3
- package/lib/events/hooks/invite.d.ts +1 -1
- package/lib/events/hooks/message.d.ts +3 -3
- package/lib/events/hooks/message.js +1 -1
- package/lib/events/hooks/presence.d.ts +2 -2
- package/lib/events/hooks/soundboard.d.ts +155 -0
- package/lib/events/hooks/soundboard.js +28 -0
- package/lib/events/hooks/stage.d.ts +2 -2
- package/lib/events/hooks/subscriptions.d.ts +35 -0
- package/lib/events/hooks/subscriptions.js +16 -0
- package/lib/events/hooks/thread.d.ts +2 -2
- package/lib/events/hooks/thread.js +2 -2
- package/lib/events/hooks/typing.d.ts +1 -1
- package/lib/events/hooks/typing.js +1 -1
- package/lib/events/hooks/user.d.ts +2 -2
- package/lib/events/hooks/voice.d.ts +2 -2
- package/lib/events/hooks/voice.js +1 -1
- package/lib/events/hooks/webhook.d.ts +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +3 -5
- package/lib/langs/handler.d.ts +2 -2
- package/lib/structures/Guild.d.ts +7 -4
- package/lib/structures/Guild.js +1 -1
- package/lib/structures/GuildBan.d.ts +1 -1
- package/lib/structures/GuildMember.d.ts +7 -5
- package/lib/structures/GuildMember.js +5 -3
- package/lib/structures/GuildRole.d.ts +1 -1
- package/lib/structures/GuildTemplate.d.ts +1 -1
- package/lib/structures/Interaction.d.ts +39 -16
- package/lib/structures/Interaction.js +82 -26
- package/lib/structures/Message.d.ts +4 -10
- package/lib/structures/Message.js +5 -8
- package/lib/structures/Poll.d.ts +3 -3
- package/lib/structures/Sticker.d.ts +2 -2
- package/lib/structures/Sticker.js +1 -1
- package/lib/structures/VoiceState.d.ts +2 -1
- package/lib/structures/VoiceState.js +1 -1
- package/lib/structures/Webhook.d.ts +3 -3
- package/lib/structures/Webhook.js +1 -1
- package/lib/structures/channels.d.ts +4 -4
- package/lib/structures/channels.js +8 -7
- package/lib/structures/extra/BaseGuild.d.ts +11 -1
- package/lib/structures/extra/BaseGuild.js +27 -0
- package/lib/structures/extra/BitField.d.ts +3 -3
- package/lib/structures/extra/BitField.js +34 -33
- package/lib/structures/extra/DiscordBase.js +1 -1
- package/lib/structures/extra/Permissions.d.ts +2 -0
- package/lib/structures/extra/Permissions.js +21 -0
- package/lib/types/gateway.d.ts +71 -6
- package/lib/types/payloads/_interactions/_applicationCommands/chatInput.d.ts +6 -1
- package/lib/types/payloads/_interactions/applicationCommands.d.ts +41 -6
- package/lib/types/payloads/_interactions/applicationCommands.js +28 -1
- package/lib/types/payloads/_interactions/base.d.ts +1 -1
- package/lib/types/payloads/_interactions/responses.d.ts +74 -2
- package/lib/types/payloads/_interactions/responses.js +4 -0
- package/lib/types/payloads/channel.d.ts +46 -6
- package/lib/types/payloads/channel.js +5 -1
- package/lib/types/payloads/guild.d.ts +9 -1
- package/lib/types/payloads/guild.js +8 -0
- package/lib/types/payloads/index.d.ts +1 -0
- package/lib/types/payloads/index.js +1 -0
- package/lib/types/payloads/monetization.d.ts +29 -1
- package/lib/types/payloads/monetization.js +10 -1
- package/lib/types/payloads/soundboard.d.ts +23 -0
- package/lib/types/payloads/soundboard.js +5 -0
- package/lib/types/payloads/user.js +0 -1
- package/lib/types/rest/application.d.ts +3 -3
- package/lib/types/rest/auditLog.d.ts +1 -1
- package/lib/types/rest/channel.d.ts +5 -18
- package/lib/types/rest/guild.d.ts +2 -2
- package/lib/types/rest/guildScheduledEvent.d.ts +1 -1
- package/lib/types/rest/index.d.ts +1 -0
- package/lib/types/rest/index.js +1 -0
- package/lib/types/rest/interactions.d.ts +30 -8
- package/lib/types/rest/monetization.d.ts +22 -1
- package/lib/types/rest/oauth2.d.ts +1 -1
- package/lib/types/rest/poll.d.ts +1 -1
- package/lib/types/rest/soundboard.d.ts +64 -0
- package/lib/types/rest/soundboard.js +2 -0
- package/lib/types/rest/stageInstance.d.ts +1 -1
- package/lib/types/rest/template.d.ts +1 -1
- package/lib/types/rest/user.d.ts +1 -1
- package/lib/types/rest/webhook.d.ts +3 -3
- package/lib/types/utils/index.d.ts +27 -7
- package/lib/types/utils/index.js +25 -6
- package/lib/websocket/SharedTypes.d.ts +18 -3
- package/lib/websocket/constants/index.d.ts +3 -2
- package/lib/websocket/constants/index.js +4 -4
- package/lib/websocket/discord/basesocket.d.ts +1 -1
- package/lib/websocket/discord/shard.d.ts +4 -3
- package/lib/websocket/discord/shard.js +47 -24
- package/lib/websocket/discord/sharder.d.ts +9 -6
- package/lib/websocket/discord/sharder.js +92 -17
- package/lib/websocket/discord/shared.d.ts +12 -3
- package/lib/websocket/discord/socket/custom.d.ts +1 -1
- package/lib/websocket/discord/socket/custom.js +70 -40
- package/lib/websocket/discord/worker.d.ts +9 -2
- package/lib/websocket/discord/workermanager.d.ts +42 -16
- package/lib/websocket/discord/workermanager.js +170 -46
- package/lib/websocket/structures/timeout.d.ts +4 -5
- package/lib/websocket/structures/timeout.js +23 -24
- package/package.json +72 -65
- package/lib/cache/resources/threads.d.ts +0 -14
- package/lib/cache/resources/threads.js +0 -32
package/lib/cache/index.js
CHANGED
|
@@ -14,10 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Cache = void 0;
|
|
17
|
+
exports.Cache = exports.GuildBasedResource = exports.GuildRelatedResource = exports.BaseResource = void 0;
|
|
18
18
|
const common_1 = require("../common");
|
|
19
19
|
const guilds_1 = require("./resources/guilds");
|
|
20
20
|
const users_1 = require("./resources/users");
|
|
21
|
+
const bans_1 = require("./resources/bans");
|
|
21
22
|
const channels_1 = require("./resources/channels");
|
|
22
23
|
const emojis_1 = require("./resources/emojis");
|
|
23
24
|
const members_1 = require("./resources/members");
|
|
@@ -25,12 +26,16 @@ const presence_1 = require("./resources/presence");
|
|
|
25
26
|
const roles_1 = require("./resources/roles");
|
|
26
27
|
const stage_instances_1 = require("./resources/stage-instances");
|
|
27
28
|
const stickers_1 = require("./resources/stickers");
|
|
28
|
-
const threads_1 = require("./resources/threads");
|
|
29
29
|
const voice_states_1 = require("./resources/voice-states");
|
|
30
|
-
const bans_1 = require("./resources/bans");
|
|
31
30
|
const types_1 = require("../types");
|
|
32
|
-
const overwrites_1 = require("./resources/overwrites");
|
|
33
31
|
const messages_1 = require("./resources/messages");
|
|
32
|
+
const overwrites_1 = require("./resources/overwrites");
|
|
33
|
+
var base_1 = require("./resources/default/base");
|
|
34
|
+
Object.defineProperty(exports, "BaseResource", { enumerable: true, get: function () { return base_1.BaseResource; } });
|
|
35
|
+
var guild_related_1 = require("./resources/default/guild-related");
|
|
36
|
+
Object.defineProperty(exports, "GuildRelatedResource", { enumerable: true, get: function () { return guild_related_1.GuildRelatedResource; } });
|
|
37
|
+
var guild_based_1 = require("./resources/default/guild-based");
|
|
38
|
+
Object.defineProperty(exports, "GuildBasedResource", { enumerable: true, get: function () { return guild_based_1.GuildBasedResource; } });
|
|
34
39
|
__exportStar(require("./adapters/index"), exports);
|
|
35
40
|
class Cache {
|
|
36
41
|
intents;
|
|
@@ -46,7 +51,6 @@ class Cache {
|
|
|
46
51
|
overwrites;
|
|
47
52
|
roles;
|
|
48
53
|
emojis;
|
|
49
|
-
threads;
|
|
50
54
|
channels;
|
|
51
55
|
stickers;
|
|
52
56
|
presences;
|
|
@@ -91,9 +95,6 @@ class Cache {
|
|
|
91
95
|
if (!this.disabledCache.presences) {
|
|
92
96
|
this.presences = new presence_1.Presences(this, client);
|
|
93
97
|
}
|
|
94
|
-
if (!this.disabledCache.threads) {
|
|
95
|
-
this.threads = new threads_1.Threads(this, client);
|
|
96
|
-
}
|
|
97
98
|
if (!this.disabledCache.stageInstances) {
|
|
98
99
|
this.stageInstances = new stage_instances_1.StageInstances(this, client);
|
|
99
100
|
}
|
|
@@ -103,8 +104,12 @@ class Cache {
|
|
|
103
104
|
if (!this.disabledCache.bans) {
|
|
104
105
|
this.bans = new bans_1.Bans(this, client);
|
|
105
106
|
}
|
|
106
|
-
if (this.disabledCache.onPacket)
|
|
107
|
-
|
|
107
|
+
if (this.disabledCache.onPacket) {
|
|
108
|
+
//@ts-expect-error
|
|
109
|
+
this.onPacket = () => {
|
|
110
|
+
// disable cache
|
|
111
|
+
};
|
|
112
|
+
}
|
|
108
113
|
}
|
|
109
114
|
/** @internal */
|
|
110
115
|
__setClient(client) {
|
|
@@ -118,7 +123,6 @@ class Cache {
|
|
|
118
123
|
this.emojis?.__setClient(client);
|
|
119
124
|
this.stickers?.__setClient(client);
|
|
120
125
|
this.presences?.__setClient(client);
|
|
121
|
-
this.threads?.__setClient(client);
|
|
122
126
|
this.stageInstances?.__setClient(client);
|
|
123
127
|
this.messages?.__setClient(client);
|
|
124
128
|
this.bans?.__setClient(client);
|
|
@@ -142,8 +146,8 @@ class Cache {
|
|
|
142
146
|
get hasGuildMembersIntent() {
|
|
143
147
|
return this.hasIntent('GuildMembers');
|
|
144
148
|
}
|
|
145
|
-
get
|
|
146
|
-
return this.hasIntent('
|
|
149
|
+
get hasGuildExpressionsIntent() {
|
|
150
|
+
return this.hasIntent('GuildExpressions');
|
|
147
151
|
}
|
|
148
152
|
get hasVoiceStatesIntent() {
|
|
149
153
|
return this.hasIntent('GuildVoiceStates');
|
|
@@ -171,7 +175,6 @@ class Cache {
|
|
|
171
175
|
}
|
|
172
176
|
break;
|
|
173
177
|
case 'roles':
|
|
174
|
-
case 'threads':
|
|
175
178
|
case 'stickers':
|
|
176
179
|
case 'channels':
|
|
177
180
|
case 'presences':
|
|
@@ -214,7 +217,6 @@ class Cache {
|
|
|
214
217
|
for (const [type, data, id, guildId] of keys) {
|
|
215
218
|
switch (type) {
|
|
216
219
|
case 'roles':
|
|
217
|
-
case 'threads':
|
|
218
220
|
case 'stickers':
|
|
219
221
|
case 'channels':
|
|
220
222
|
case 'presences':
|
|
@@ -286,7 +288,6 @@ class Cache {
|
|
|
286
288
|
for (const [type, data, id, guildId] of keys) {
|
|
287
289
|
switch (type) {
|
|
288
290
|
case 'roles':
|
|
289
|
-
case 'threads':
|
|
290
291
|
case 'stickers':
|
|
291
292
|
case 'channels':
|
|
292
293
|
case 'presences':
|
|
@@ -371,15 +372,17 @@ class Cache {
|
|
|
371
372
|
break;
|
|
372
373
|
case 'CHANNEL_CREATE':
|
|
373
374
|
case 'CHANNEL_UPDATE':
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
375
|
+
{
|
|
376
|
+
if ('guild_id' in event.d) {
|
|
377
|
+
await this.channels?.set(event.d.id, event.d.guild_id, event.d);
|
|
378
|
+
if (event.d.permission_overwrites?.length)
|
|
379
|
+
await this.overwrites?.set(event.d.id, event.d.guild_id, event.d.permission_overwrites);
|
|
380
|
+
break;
|
|
381
|
+
}
|
|
382
|
+
if (event.d.type === types_1.ChannelType.DM) {
|
|
383
|
+
await this.channels?.set(event.d.recipients[0]?.id, '@me', event.d);
|
|
384
|
+
break;
|
|
385
|
+
}
|
|
383
386
|
}
|
|
384
387
|
break;
|
|
385
388
|
case 'CHANNEL_DELETE':
|
|
@@ -399,12 +402,16 @@ class Cache {
|
|
|
399
402
|
await this.bans?.remove(event.d.user.id, event.d.guild_id);
|
|
400
403
|
break;
|
|
401
404
|
case 'GUILD_EMOJIS_UPDATE':
|
|
402
|
-
|
|
403
|
-
|
|
405
|
+
{
|
|
406
|
+
await this.emojis?.remove(await this.emojis?.keys(event.d.guild_id), event.d.guild_id);
|
|
407
|
+
await this.emojis?.set(event.d.emojis.map(x => [x.id, x]), event.d.guild_id);
|
|
408
|
+
}
|
|
404
409
|
break;
|
|
405
410
|
case 'GUILD_STICKERS_UPDATE':
|
|
406
|
-
|
|
407
|
-
|
|
411
|
+
{
|
|
412
|
+
await this.stickers?.remove(await this.stickers?.keys(event.d.guild_id), event.d.guild_id);
|
|
413
|
+
await this.stickers?.set(event.d.stickers.map(x => [x.id, x]), event.d.guild_id);
|
|
414
|
+
}
|
|
408
415
|
break;
|
|
409
416
|
case 'GUILD_MEMBER_ADD':
|
|
410
417
|
case 'GUILD_MEMBER_UPDATE':
|
|
@@ -421,23 +428,25 @@ class Cache {
|
|
|
421
428
|
case 'THREAD_CREATE':
|
|
422
429
|
case 'THREAD_UPDATE':
|
|
423
430
|
if (event.d.guild_id)
|
|
424
|
-
await this.
|
|
431
|
+
await this.channels?.set(event.d.id, event.d.guild_id, event.d);
|
|
425
432
|
break;
|
|
426
433
|
case 'THREAD_DELETE':
|
|
427
|
-
await this.
|
|
434
|
+
await this.channels?.remove(event.d.id, event.d.guild_id);
|
|
428
435
|
break;
|
|
429
436
|
case 'USER_UPDATE':
|
|
430
437
|
await this.users?.set(event.d.id, event.d);
|
|
431
438
|
break;
|
|
432
439
|
case 'VOICE_STATE_UPDATE':
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
440
|
+
{
|
|
441
|
+
if (!event.d.guild_id) {
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
444
|
+
if (event.d.channel_id != null) {
|
|
445
|
+
await this.voiceStates?.set(event.d.user_id, event.d.guild_id, event.d);
|
|
446
|
+
}
|
|
447
|
+
else {
|
|
448
|
+
await this.voiceStates?.remove(event.d.user_id, event.d.guild_id);
|
|
449
|
+
}
|
|
441
450
|
}
|
|
442
451
|
break;
|
|
443
452
|
case 'STAGE_INSTANCE_CREATE':
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { APIBan, GatewayGuildBanModifyDispatchData } from '../../types';
|
|
2
1
|
import type { ReturnCache } from '../..';
|
|
3
|
-
import { GuildBasedResource } from './default/guild-based';
|
|
4
2
|
import { type GuildBanStructure } from '../../client/transformers';
|
|
3
|
+
import type { APIBan, GatewayGuildBanModifyDispatchData } from '../../types';
|
|
4
|
+
import { GuildBasedResource } from './default/guild-based';
|
|
5
5
|
export declare class Bans extends GuildBasedResource<any, GatewayGuildBanModifyDispatchData | APIBan> {
|
|
6
6
|
namespace: string;
|
|
7
7
|
filter(data: APIBan, id: string, guild_id: string): boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Bans = void 0;
|
|
4
|
+
const transformers_1 = require("../../client/transformers");
|
|
4
5
|
const common_1 = require("../../common");
|
|
5
6
|
const guild_based_1 = require("./default/guild-based");
|
|
6
|
-
const transformers_1 = require("../../client/transformers");
|
|
7
7
|
class Bans extends guild_based_1.GuildBasedResource {
|
|
8
8
|
namespace = 'ban';
|
|
9
9
|
//@ts-expect-error
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { type AllChannels, channelFrom } from '../../structures';
|
|
1
2
|
import type { APIChannel } from '../../types';
|
|
2
|
-
import { channelFrom, type AllChannels } from '../../structures';
|
|
3
3
|
import type { ReturnCache } from '../index';
|
|
4
4
|
import { GuildRelatedResource } from './default/guild-related';
|
|
5
5
|
export declare class Channels extends GuildRelatedResource<any, APIChannel> {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type { BaseClient } from '../../../client/base';
|
|
2
1
|
import type { UsingClient } from '../../../commands';
|
|
3
2
|
import type { GatewayIntentBits } from '../../../types';
|
|
4
3
|
import type { Cache, ReturnCache } from '../../index';
|
|
5
4
|
export declare class GuildRelatedResource<T = any, S = any> {
|
|
6
5
|
protected cache: Cache;
|
|
7
|
-
client:
|
|
6
|
+
client: UsingClient;
|
|
8
7
|
namespace: string;
|
|
9
8
|
constructor(cache: Cache, client?: UsingClient);
|
|
10
9
|
filter(data: any, id: string, guild_id?: string): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { APIEmoji } from '../../types';
|
|
2
1
|
import type { ReturnCache } from '../..';
|
|
3
|
-
import { GuildRelatedResource } from './default/guild-related';
|
|
4
2
|
import { type GuildEmojiStructure } from '../../client/transformers';
|
|
3
|
+
import type { APIEmoji } from '../../types';
|
|
4
|
+
import { GuildRelatedResource } from './default/guild-related';
|
|
5
5
|
export declare class Emojis extends GuildRelatedResource<any, APIEmoji> {
|
|
6
6
|
namespace: string;
|
|
7
7
|
filter(data: APIEmoji, id: string, guild_id?: string): boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Emojis = void 0;
|
|
4
|
+
const transformers_1 = require("../../client/transformers");
|
|
4
5
|
const common_1 = require("../../common");
|
|
5
6
|
const guild_related_1 = require("./default/guild-related");
|
|
6
|
-
const transformers_1 = require("../../client/transformers");
|
|
7
7
|
class Emojis extends guild_related_1.GuildRelatedResource {
|
|
8
8
|
namespace = 'emoji';
|
|
9
9
|
//@ts-expect-error
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { APIGuild, GatewayGuildCreateDispatchData } from '../../types';
|
|
2
1
|
import type { ReturnCache } from '..';
|
|
3
|
-
import { BaseResource } from './default/base';
|
|
4
2
|
import { type GuildStructure } from '../../client/transformers';
|
|
3
|
+
import type { APIGuild, GatewayGuildCreateDispatchData } from '../../types';
|
|
4
|
+
import { BaseResource } from './default/base';
|
|
5
5
|
export declare class Guilds extends BaseResource<any, APIGuild | GatewayGuildCreateDispatchData> {
|
|
6
6
|
namespace: string;
|
|
7
7
|
filter(data: APIGuild, id: string): boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Guilds = void 0;
|
|
4
|
+
const transformers_1 = require("../../client/transformers");
|
|
4
5
|
const common_1 = require("../../common");
|
|
5
6
|
const base_1 = require("./default/base");
|
|
6
|
-
const transformers_1 = require("../../client/transformers");
|
|
7
7
|
class Guilds extends base_1.BaseResource {
|
|
8
8
|
namespace = 'guild';
|
|
9
9
|
//@ts-expect-error
|
|
@@ -38,7 +38,6 @@ class Guilds extends base_1.BaseResource {
|
|
|
38
38
|
this.cache.stickers?.keys(id) ?? [],
|
|
39
39
|
this.cache.voiceStates?.keys(id) ?? [],
|
|
40
40
|
this.cache.presences?.keys(id) ?? [],
|
|
41
|
-
this.cache.threads?.keys(id) ?? [],
|
|
42
41
|
this.cache.stageInstances?.keys(id) ?? [],
|
|
43
42
|
this.cache.bans?.keys(id) ?? [],
|
|
44
43
|
])).flat());
|
|
@@ -60,7 +59,6 @@ class Guilds extends base_1.BaseResource {
|
|
|
60
59
|
this.cache.stickers?.hashId(id),
|
|
61
60
|
this.cache.voiceStates?.hashId(id),
|
|
62
61
|
this.cache.presences?.hashId(id),
|
|
63
|
-
this.cache.threads?.hashId(id),
|
|
64
62
|
this.cache.stageInstances?.hashId(id),
|
|
65
63
|
].filter(Boolean));
|
|
66
64
|
await super.remove(id);
|
|
@@ -82,6 +80,9 @@ class Guilds extends base_1.BaseResource {
|
|
|
82
80
|
if (channel.permission_overwrites?.length)
|
|
83
81
|
bulkData.push(['overwrites', channel.permission_overwrites, channel.id, id]);
|
|
84
82
|
}
|
|
83
|
+
for (const thread of data.threads ?? []) {
|
|
84
|
+
bulkData.push(['channels', thread, thread.id, id]);
|
|
85
|
+
}
|
|
85
86
|
for (const emoji of data.emojis ?? []) {
|
|
86
87
|
bulkData.push(['emojis', emoji, emoji.id, id]);
|
|
87
88
|
}
|
|
@@ -94,9 +95,6 @@ class Guilds extends base_1.BaseResource {
|
|
|
94
95
|
for (const presence of data.presences ?? []) {
|
|
95
96
|
bulkData.push(['presences', presence, presence.user.id, id]);
|
|
96
97
|
}
|
|
97
|
-
for (const thread of data.threads ?? []) {
|
|
98
|
-
bulkData.push(['threads', thread, thread.id, id]);
|
|
99
|
-
}
|
|
100
98
|
for (const instance of data.stage_instances ?? []) {
|
|
101
99
|
bulkData.push(['stageInstances', instance, instance.id, id]);
|
|
102
100
|
}
|
|
@@ -118,12 +116,13 @@ class Guilds extends base_1.BaseResource {
|
|
|
118
116
|
}
|
|
119
117
|
for (const channel of data.channels ?? []) {
|
|
120
118
|
bulkData.push(['channels', channel, channel.id, id]);
|
|
121
|
-
}
|
|
122
|
-
for (const channel of data.channels ?? []) {
|
|
123
119
|
if (channel.permission_overwrites?.length) {
|
|
124
120
|
bulkData.push(['overwrites', channel.permission_overwrites, channel.id, id]);
|
|
125
121
|
}
|
|
126
122
|
}
|
|
123
|
+
for (const thread of data.threads ?? []) {
|
|
124
|
+
bulkData.push(['channels', thread, thread.id, id]);
|
|
125
|
+
}
|
|
127
126
|
for (const emoji of data.emojis ?? []) {
|
|
128
127
|
bulkData.push(['emojis', emoji, emoji.id, id]);
|
|
129
128
|
}
|
|
@@ -136,9 +135,6 @@ class Guilds extends base_1.BaseResource {
|
|
|
136
135
|
for (const presence of data.presences ?? []) {
|
|
137
136
|
bulkData.push(['presences', presence, presence.user.id, id]);
|
|
138
137
|
}
|
|
139
|
-
for (const thread of data.threads ?? []) {
|
|
140
|
-
bulkData.push(['threads', thread, thread.id, id]);
|
|
141
|
-
}
|
|
142
138
|
for (const instance of data.stage_instances ?? []) {
|
|
143
139
|
bulkData.push(['stageInstances', instance, instance.id, id]);
|
|
144
140
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { APIGuildMember } from '../../types';
|
|
2
1
|
import type { ReturnCache } from '../..';
|
|
3
|
-
import { GuildBasedResource } from './default/guild-based';
|
|
4
2
|
import { type GuildMemberStructure } from '../../client/transformers';
|
|
3
|
+
import type { APIGuildMember } from '../../types';
|
|
4
|
+
import { GuildBasedResource } from './default/guild-based';
|
|
5
5
|
export declare class Members extends GuildBasedResource<any, APIGuildMember> {
|
|
6
6
|
namespace: string;
|
|
7
7
|
filter(data: APIGuildMember, id: string, guild_id: string): boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Members = void 0;
|
|
4
|
+
const transformers_1 = require("../../client/transformers");
|
|
4
5
|
const common_1 = require("../../common");
|
|
5
6
|
const guild_based_1 = require("./default/guild-based");
|
|
6
|
-
const transformers_1 = require("../../client/transformers");
|
|
7
7
|
class Members extends guild_based_1.GuildBasedResource {
|
|
8
8
|
namespace = 'member';
|
|
9
9
|
//@ts-expect-error
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { APIMessage } from '../../types';
|
|
2
|
-
import { GuildRelatedResource } from './default/guild-related';
|
|
3
1
|
import type { MessageData, ReturnCache } from '../..';
|
|
4
2
|
import { type MessageStructure } from '../../client/transformers';
|
|
3
|
+
import type { APIMessage } from '../../types';
|
|
4
|
+
import { GuildRelatedResource } from './default/guild-related';
|
|
5
5
|
export declare class Messages extends GuildRelatedResource<any, APIMessage> {
|
|
6
6
|
namespace: string;
|
|
7
7
|
filter(data: MessageData, id: string, channel_id?: string): boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Messages = void 0;
|
|
4
|
-
const guild_related_1 = require("./default/guild-related");
|
|
5
|
-
const common_1 = require("../../common");
|
|
6
4
|
const transformers_1 = require("../../client/transformers");
|
|
5
|
+
const common_1 = require("../../common");
|
|
6
|
+
const guild_related_1 = require("./default/guild-related");
|
|
7
7
|
class Messages extends guild_related_1.GuildRelatedResource {
|
|
8
8
|
namespace = 'message';
|
|
9
9
|
//@ts-expect-error
|
|
@@ -45,7 +45,7 @@ class Messages extends guild_related_1.GuildRelatedResource {
|
|
|
45
45
|
values(channel) {
|
|
46
46
|
return (0, common_1.fakePromise)(super.values(channel)).then(messages => {
|
|
47
47
|
const hashes = this.cache.users
|
|
48
|
-
? messages.map(x => (x.user_id ? this.cache.users
|
|
48
|
+
? messages.map(x => (x.user_id ? this.cache.users?.hashId(x.user_id) : undefined))
|
|
49
49
|
: [];
|
|
50
50
|
return (0, common_1.fakePromise)(this.cache.adapter.bulkGet(hashes.filter(Boolean))).then(users => {
|
|
51
51
|
return messages
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { APIOverwrite } from '../../types';
|
|
2
1
|
import type { ReturnCache } from '../..';
|
|
3
2
|
import { PermissionsBitField } from '../../structures/extra/Permissions';
|
|
3
|
+
import type { APIOverwrite } from '../../types';
|
|
4
4
|
import { GuildRelatedResource } from './default/guild-related';
|
|
5
5
|
export declare class Overwrites extends GuildRelatedResource<any, APIOverwrite[]> {
|
|
6
6
|
namespace: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { APIRole } from '../../types';
|
|
2
1
|
import type { ReturnCache } from '../..';
|
|
3
|
-
import { GuildRelatedResource } from './default/guild-related';
|
|
4
2
|
import { type GuildRoleStructure } from '../../client/transformers';
|
|
3
|
+
import type { APIRole } from '../../types';
|
|
4
|
+
import { GuildRelatedResource } from './default/guild-related';
|
|
5
5
|
export declare class Roles extends GuildRelatedResource<any, APIRole> {
|
|
6
6
|
namespace: string;
|
|
7
7
|
filter(data: APIRole, id: string, guild_id?: string): boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Roles = void 0;
|
|
4
|
+
const transformers_1 = require("../../client/transformers");
|
|
4
5
|
const common_1 = require("../../common");
|
|
5
6
|
const guild_related_1 = require("./default/guild-related");
|
|
6
|
-
const transformers_1 = require("../../client/transformers");
|
|
7
7
|
class Roles extends guild_related_1.GuildRelatedResource {
|
|
8
8
|
namespace = 'role';
|
|
9
9
|
//@ts-expect-error
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { APISticker } from '../../types';
|
|
2
1
|
import type { ReturnCache } from '../..';
|
|
3
|
-
import { GuildRelatedResource } from './default/guild-related';
|
|
4
2
|
import { type StickerStructure } from '../../client/transformers';
|
|
3
|
+
import type { APISticker } from '../../types';
|
|
4
|
+
import { GuildRelatedResource } from './default/guild-related';
|
|
5
5
|
export declare class Stickers extends GuildRelatedResource<any, APISticker> {
|
|
6
6
|
namespace: string;
|
|
7
7
|
filter(data: APISticker, id: string, guild_id?: string): boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Stickers = void 0;
|
|
4
|
+
const transformers_1 = require("../../client/transformers");
|
|
4
5
|
const common_1 = require("../../common");
|
|
5
6
|
const guild_related_1 = require("./default/guild-related");
|
|
6
|
-
const transformers_1 = require("../../client/transformers");
|
|
7
7
|
class Stickers extends guild_related_1.GuildRelatedResource {
|
|
8
8
|
namespace = 'sticker';
|
|
9
9
|
//@ts-expect-error
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { APIUser } from '../../types';
|
|
2
1
|
import type { ReturnCache } from '../..';
|
|
3
|
-
import { BaseResource } from './default/base';
|
|
4
2
|
import { type UserStructure } from '../../client/transformers';
|
|
3
|
+
import type { APIUser } from '../../types';
|
|
4
|
+
import { BaseResource } from './default/base';
|
|
5
5
|
export declare class Users extends BaseResource<any, APIUser> {
|
|
6
6
|
namespace: string;
|
|
7
7
|
filter(data: APIUser, id: string): boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Users = void 0;
|
|
4
|
+
const transformers_1 = require("../../client/transformers");
|
|
4
5
|
const common_1 = require("../../common");
|
|
5
6
|
const base_1 = require("./default/base");
|
|
6
|
-
const transformers_1 = require("../../client/transformers");
|
|
7
7
|
class Users extends base_1.BaseResource {
|
|
8
8
|
namespace = 'user';
|
|
9
9
|
//@ts-expect-error
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { APIVoiceState } from '../../types';
|
|
2
1
|
import type { ReturnCache } from '../..';
|
|
3
|
-
import { GuildBasedResource } from './default/guild-based';
|
|
4
2
|
import { type VoiceStateStructure } from '../../client/transformers';
|
|
3
|
+
import type { APIVoiceState } from '../../types';
|
|
4
|
+
import { GuildBasedResource } from './default/guild-based';
|
|
5
5
|
export declare class VoiceStates extends GuildBasedResource<any, APIVoiceState> {
|
|
6
6
|
namespace: string;
|
|
7
7
|
filter(data: APIVoiceState, id: string, guild_id: string): boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VoiceStates = void 0;
|
|
4
|
+
const transformers_1 = require("../../client/transformers");
|
|
4
5
|
const common_1 = require("../../common");
|
|
5
6
|
const guild_based_1 = require("./default/guild-based");
|
|
6
|
-
const transformers_1 = require("../../client/transformers");
|
|
7
7
|
class VoiceStates extends guild_based_1.GuildBasedResource {
|
|
8
8
|
namespace = 'voice_state';
|
|
9
9
|
//@ts-expect-error
|
package/lib/client/base.d.ts
CHANGED
|
@@ -4,15 +4,15 @@ import { Cache } from '../cache';
|
|
|
4
4
|
import type { Command, CommandContext, ContextMenuCommand, ExtraProps, MenuCommandContext, RegisteredMiddlewares, SubCommand, UsingClient } from '../commands';
|
|
5
5
|
import { type InferWithPrefix, type MiddlewareContext } from '../commands/applications/shared';
|
|
6
6
|
import { CommandHandler } from '../commands/handler';
|
|
7
|
-
import { ApplicationShorter, ChannelShorter, EmojiShorter, GuildShorter, InteractionShorter, Logger, MemberShorter, MessageShorter, ReactionShorter, RoleShorter, TemplateShorter, ThreadShorter, UsersShorter, WebhookShorter
|
|
8
|
-
import
|
|
7
|
+
import { ApplicationShorter, ChannelShorter, EmojiShorter, GuildShorter, InteractionShorter, Logger, type MakeRequired, MemberShorter, MessageShorter, ReactionShorter, RoleShorter, TemplateShorter, ThreadShorter, UsersShorter, WebhookShorter } from '../common';
|
|
8
|
+
import { HandleCommand } from '../commands/handle';
|
|
9
|
+
import { BanShorter } from '../common/shorters/bans';
|
|
9
10
|
import type { Awaitable, DeepPartial, IntentStrings, OmitInsert, PermissionStrings, When } from '../common/types/util';
|
|
11
|
+
import type { ComponentCommand, ModalCommand } from '../components';
|
|
10
12
|
import { ComponentHandler } from '../components/handler';
|
|
11
13
|
import { LangsHandler } from '../langs/handler';
|
|
12
|
-
import type { ChatInputCommandInteraction, ComponentInteraction, MessageCommandInteraction, ModalSubmitInteraction, UserCommandInteraction } from '../structures';
|
|
13
|
-
import type {
|
|
14
|
-
import { BanShorter } from '../common/shorters/bans';
|
|
15
|
-
import { HandleCommand } from '../commands/handle';
|
|
14
|
+
import type { ChatInputCommandInteraction, ComponentInteraction, EntryPointInteraction, MessageCommandInteraction, ModalSubmitInteraction, UserCommandInteraction } from '../structures';
|
|
15
|
+
import type { LocaleString, RESTPostAPIChannelMessageJSONBody } from '../types';
|
|
16
16
|
import type { MessageStructure } from './transformers';
|
|
17
17
|
export declare class BaseClient {
|
|
18
18
|
rest: ApiHandler;
|
|
@@ -44,12 +44,12 @@ export declare class BaseClient {
|
|
|
44
44
|
protected static getBotIdFromToken(token: string): string;
|
|
45
45
|
options: BaseClientOptions;
|
|
46
46
|
constructor(options?: BaseClientOptions);
|
|
47
|
+
get proxy(): import("../api").APIRoutes;
|
|
47
48
|
set botId(id: string);
|
|
48
49
|
get botId(): string;
|
|
49
50
|
set applicationId(id: string);
|
|
50
51
|
get applicationId(): string;
|
|
51
|
-
|
|
52
|
-
setServices({ rest, cache, langs, middlewares, handlers, handleCommand }: ServicesOptions): void;
|
|
52
|
+
setServices({ rest, cache, langs, middlewares, handleCommand }: ServicesOptions): void;
|
|
53
53
|
protected execute(..._options: unknown[]): Promise<void>;
|
|
54
54
|
start(options?: Pick<DeepPartial<StartOptions>, 'langsDir' | 'commandsDir' | 'connection' | 'token' | 'componentsDir'>): Promise<void>;
|
|
55
55
|
protected onPacket(..._packet: unknown[]): Promise<any>;
|
|
@@ -78,7 +78,7 @@ export declare class BaseClient {
|
|
|
78
78
|
}>;
|
|
79
79
|
}
|
|
80
80
|
export interface BaseClientOptions {
|
|
81
|
-
context?: (interaction: ChatInputCommandInteraction<boolean> | UserCommandInteraction<boolean> | MessageCommandInteraction<boolean> | ComponentInteraction | ModalSubmitInteraction | When<InferWithPrefix, MessageStructure, never>) =>
|
|
81
|
+
context?: (interaction: ChatInputCommandInteraction<boolean> | UserCommandInteraction<boolean> | MessageCommandInteraction<boolean> | ComponentInteraction | ModalSubmitInteraction | EntryPointInteraction<boolean> | When<InferWithPrefix, MessageStructure, never>) => object;
|
|
82
82
|
globalMiddlewares?: readonly (keyof RegisteredMiddlewares)[];
|
|
83
83
|
commands?: {
|
|
84
84
|
defaults?: {
|
|
@@ -160,18 +160,13 @@ export interface ServicesOptions {
|
|
|
160
160
|
rest?: ApiHandler;
|
|
161
161
|
cache?: {
|
|
162
162
|
adapter?: Adapter;
|
|
163
|
-
disabledCache?: Cache['disabledCache'];
|
|
163
|
+
disabledCache?: boolean | Cache['disabledCache'] | ((cacheType: keyof Cache['disabledCache']) => boolean);
|
|
164
164
|
};
|
|
165
165
|
langs?: {
|
|
166
166
|
default?: string;
|
|
167
167
|
aliases?: Record<string, LocaleString[]>;
|
|
168
168
|
};
|
|
169
169
|
middlewares?: Record<string, MiddlewareContext>;
|
|
170
|
-
handlers?: {
|
|
171
|
-
components?: ComponentHandler | ComponentHandler['callback'];
|
|
172
|
-
commands?: CommandHandler;
|
|
173
|
-
langs?: LangsHandler;
|
|
174
|
-
};
|
|
175
170
|
handleCommand?: typeof HandleCommand;
|
|
176
171
|
}
|
|
177
172
|
export {};
|