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/client/base.js
CHANGED
|
@@ -7,11 +7,11 @@ const cache_1 = require("../cache");
|
|
|
7
7
|
const shared_1 = require("../commands/applications/shared");
|
|
8
8
|
const handler_1 = require("../commands/handler");
|
|
9
9
|
const common_1 = require("../common");
|
|
10
|
-
const handler_2 = require("../components/handler");
|
|
11
|
-
const handler_3 = require("../langs/handler");
|
|
12
10
|
const node_fs_1 = require("node:fs");
|
|
13
|
-
const bans_1 = require("../common/shorters/bans");
|
|
14
11
|
const handle_1 = require("../commands/handle");
|
|
12
|
+
const bans_1 = require("../common/shorters/bans");
|
|
13
|
+
const handler_2 = require("../components/handler");
|
|
14
|
+
const handler_3 = require("../langs/handler");
|
|
15
15
|
class BaseClient {
|
|
16
16
|
rest;
|
|
17
17
|
cache;
|
|
@@ -103,6 +103,9 @@ class BaseClient {
|
|
|
103
103
|
},
|
|
104
104
|
}, options);
|
|
105
105
|
}
|
|
106
|
+
get proxy() {
|
|
107
|
+
return this.rest.proxy;
|
|
108
|
+
}
|
|
106
109
|
set botId(id) {
|
|
107
110
|
this._botId = id;
|
|
108
111
|
}
|
|
@@ -115,55 +118,48 @@ class BaseClient {
|
|
|
115
118
|
get applicationId() {
|
|
116
119
|
return this._applicationId ?? this.botId;
|
|
117
120
|
}
|
|
118
|
-
|
|
119
|
-
return new api_1.Router(this.rest).createProxy();
|
|
120
|
-
}
|
|
121
|
-
setServices({ rest, cache, langs, middlewares, handlers, handleCommand }) {
|
|
121
|
+
setServices({ rest, cache, langs, middlewares, handleCommand }) {
|
|
122
122
|
if (rest) {
|
|
123
123
|
this.rest = rest;
|
|
124
124
|
}
|
|
125
125
|
if (cache) {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
126
|
+
const caches = [
|
|
127
|
+
'bans',
|
|
128
|
+
'channels',
|
|
129
|
+
'emojis',
|
|
130
|
+
'guilds',
|
|
131
|
+
'members',
|
|
132
|
+
'messages',
|
|
133
|
+
'onPacket',
|
|
134
|
+
'overwrites',
|
|
135
|
+
'presences',
|
|
136
|
+
'roles',
|
|
137
|
+
'stageInstances',
|
|
138
|
+
'stickers',
|
|
139
|
+
'users',
|
|
140
|
+
'voiceStates',
|
|
141
|
+
];
|
|
142
|
+
let disabledCache = this.cache?.disabledCache ?? {};
|
|
143
|
+
if (typeof cache.disabledCache === 'boolean') {
|
|
144
|
+
for (const i of caches) {
|
|
145
|
+
disabledCache[i] = cache.disabledCache;
|
|
141
146
|
}
|
|
142
147
|
}
|
|
143
|
-
if ('
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
else if (typeof handlers.commands === 'object') {
|
|
148
|
-
this.commands ??= new handler_1.CommandHandler(this.logger, this);
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
this.commands = handlers.commands;
|
|
148
|
+
else if (typeof cache.disabledCache === 'function') {
|
|
149
|
+
for (const i of caches) {
|
|
150
|
+
disabledCache[i] = cache.disabledCache(i);
|
|
152
151
|
}
|
|
153
152
|
}
|
|
154
|
-
if ('
|
|
155
|
-
|
|
156
|
-
this.langs = undefined;
|
|
157
|
-
}
|
|
158
|
-
else if (typeof handlers.langs === 'function') {
|
|
159
|
-
this.langs ??= new handler_3.LangsHandler(this.logger);
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
162
|
-
this.langs = handlers.langs;
|
|
163
|
-
}
|
|
153
|
+
else if (typeof cache.disabledCache === 'object') {
|
|
154
|
+
disabledCache = cache.disabledCache;
|
|
164
155
|
}
|
|
156
|
+
this.cache = new cache_1.Cache(this.cache?.intents ?? 0, cache?.adapter ?? this.cache?.adapter ?? new cache_1.MemoryAdapter(), disabledCache, this);
|
|
157
|
+
}
|
|
158
|
+
if (middlewares) {
|
|
159
|
+
this.middlewares = middlewares;
|
|
165
160
|
}
|
|
166
161
|
if (langs) {
|
|
162
|
+
this.langs ??= new handler_3.LangsHandler(this.logger);
|
|
167
163
|
if (langs.default)
|
|
168
164
|
this.langs.defaultLang = langs.default;
|
|
169
165
|
if (langs.aliases)
|
|
@@ -232,7 +228,10 @@ class BaseClient {
|
|
|
232
228
|
applicationId ??= await this.getRC().then(x => x.applicationId ?? this.applicationId);
|
|
233
229
|
BaseClient.assertString(applicationId, 'applicationId is not a string');
|
|
234
230
|
const commands = this.commands.values;
|
|
235
|
-
const filter = (0, common_1.filterSplit)(commands, command => !command.guildId);
|
|
231
|
+
const filter = (0, common_1.filterSplit)(commands, command => ('guildId' in command ? !command.guildId : true));
|
|
232
|
+
if (this.commands?.entryPoint) {
|
|
233
|
+
filter.expect.push(this.commands.entryPoint);
|
|
234
|
+
}
|
|
236
235
|
if (!cachePath || (await this.shouldUploadCommands(cachePath)))
|
|
237
236
|
await this.proxy.applications(applicationId).commands.put({
|
|
238
237
|
body: filter.expect
|
|
@@ -252,7 +251,7 @@ class BaseClient {
|
|
|
252
251
|
.guilds(guildId)
|
|
253
252
|
.commands.put({
|
|
254
253
|
body: filter.never
|
|
255
|
-
.filter(cmd => cmd.guildId
|
|
254
|
+
.filter(cmd => cmd.guildId.includes(guildId) && (!('ignore' in cmd) || cmd.ignore !== shared_1.IgnoreCommand.Slash))
|
|
256
255
|
.map(x => x.toJSON()),
|
|
257
256
|
});
|
|
258
257
|
}
|
|
@@ -287,7 +286,12 @@ class BaseClient {
|
|
|
287
286
|
async getRC() {
|
|
288
287
|
const seyfertConfig = (BaseClient._seyfertCfWorkerConfig ||
|
|
289
288
|
(await this.options?.getRC?.()) ||
|
|
290
|
-
(await Promise.any(['.js', '.mjs', '.cjs', '.ts', '.mts', '.cts'].map(ext => (0, common_1.magicImport)((0, node_path_1.join)(process.cwd(), `seyfert.config${ext}`)).then(x => x.default ?? x))))
|
|
289
|
+
(await Promise.any(['.js', '.mjs', '.cjs', '.ts', '.mts', '.cts'].map(ext => (0, common_1.magicImport)((0, node_path_1.join)(process.cwd(), `seyfert.config${ext}`)).then(x => x.default ?? x))).catch((e) => {
|
|
290
|
+
if (e.errors.every((err) => err.stack?.includes('ERR_MODULE_NOT_FOUND'))) {
|
|
291
|
+
throw new Error('No seyfert.config file found');
|
|
292
|
+
}
|
|
293
|
+
throw e.errors.find((err) => !err.stack?.includes('ERR_MODULE_NOT_FOUND')) ?? e.errors[0];
|
|
294
|
+
})));
|
|
291
295
|
const { locations, debug, ...env } = seyfertConfig;
|
|
292
296
|
const obj = {
|
|
293
297
|
debug: !!debug,
|
package/lib/client/client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type GatewayDispatchPayload, type GatewayPresenceUpdateData } from '../types';
|
|
2
1
|
import type { CommandContext, Message } from '..';
|
|
3
2
|
import { type Awaitable, type DeepPartial, type If } from '../common';
|
|
4
3
|
import { EventHandler } from '../events';
|
|
4
|
+
import { type GatewayDispatchPayload, type GatewayPresenceUpdateData } from '../types';
|
|
5
5
|
import { ShardManager, type ShardManagerOptions } from '../websocket';
|
|
6
6
|
import { MemberUpdateHandler } from '../websocket/discord/events/memberUpdate';
|
|
7
7
|
import { PresenceUpdateHandler } from '../websocket/discord/events/presenceUpdate';
|
|
@@ -23,9 +23,6 @@ export declare class Client<Ready extends boolean = boolean> extends BaseClient
|
|
|
23
23
|
constructor(options?: ClientOptions);
|
|
24
24
|
setServices({ gateway, ...rest }: ServicesOptions & {
|
|
25
25
|
gateway?: ShardManager;
|
|
26
|
-
handlers?: ServicesOptions['handlers'] & {
|
|
27
|
-
events?: EventHandler['callback'];
|
|
28
|
-
};
|
|
29
26
|
}): void;
|
|
30
27
|
loadEvents(dir?: string): Promise<void>;
|
|
31
28
|
protected execute(options?: {
|
|
@@ -52,4 +49,7 @@ export interface ClientOptions extends BaseClientOptions {
|
|
|
52
49
|
reply?: (ctx: CommandContext) => boolean;
|
|
53
50
|
};
|
|
54
51
|
handlePayload?: ShardManagerOptions['handlePayload'];
|
|
52
|
+
resharding?: Omit<NonNullable<ShardManagerOptions['resharding']>, 'getInfo'> & {
|
|
53
|
+
getInfo?: NonNullable<ShardManagerOptions['resharding']>['getInfo'];
|
|
54
|
+
};
|
|
55
55
|
}
|
package/lib/client/client.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Client = void 0;
|
|
4
|
-
const types_1 = require("../types");
|
|
5
4
|
const common_1 = require("../common");
|
|
6
5
|
const events_1 = require("../events");
|
|
6
|
+
const types_1 = require("../types");
|
|
7
7
|
const websocket_1 = require("../websocket");
|
|
8
8
|
const memberUpdate_1 = require("../websocket/discord/events/memberUpdate");
|
|
9
9
|
const presenceUpdate_1 = require("../websocket/discord/events/presenceUpdate");
|
|
@@ -12,7 +12,7 @@ const collectors_1 = require("./collectors");
|
|
|
12
12
|
const transformers_1 = require("./transformers");
|
|
13
13
|
let parentPort;
|
|
14
14
|
class Client extends base_1.BaseClient {
|
|
15
|
-
__handleGuilds
|
|
15
|
+
__handleGuilds;
|
|
16
16
|
gateway;
|
|
17
17
|
me;
|
|
18
18
|
memberUpdateHandler = new memberUpdate_1.MemberUpdateHandler();
|
|
@@ -33,17 +33,6 @@ class Client extends base_1.BaseClient {
|
|
|
33
33
|
};
|
|
34
34
|
this.gateway = gateway;
|
|
35
35
|
}
|
|
36
|
-
if (rest.handlers && 'events' in rest.handlers) {
|
|
37
|
-
if (!rest.handlers.events) {
|
|
38
|
-
this.events = undefined;
|
|
39
|
-
}
|
|
40
|
-
else if (typeof rest.handlers.events === 'function') {
|
|
41
|
-
this.events = new events_1.EventHandler(this);
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
this.events = rest.handlers.events;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
36
|
}
|
|
48
37
|
async loadEvents(dir) {
|
|
49
38
|
dir ??= await this.getRC().then(x => x.events);
|
|
@@ -100,6 +89,11 @@ class Client extends base_1.BaseClient {
|
|
|
100
89
|
...this.options?.gateway?.properties,
|
|
101
90
|
},
|
|
102
91
|
compress: this.options?.gateway?.compress,
|
|
92
|
+
resharding: {
|
|
93
|
+
getInfo: this.options.resharding?.getInfo ?? (() => this.proxy.gateway.bot.get()),
|
|
94
|
+
interval: this.options?.resharding?.interval,
|
|
95
|
+
percentage: this.options?.resharding?.percentage,
|
|
96
|
+
},
|
|
103
97
|
});
|
|
104
98
|
}
|
|
105
99
|
this.cache.intents = this.gateway.options.intents;
|
|
@@ -116,31 +110,35 @@ class Client extends base_1.BaseClient {
|
|
|
116
110
|
this.collectors.run('RAW', packet, this),
|
|
117
111
|
]); //ignore promise
|
|
118
112
|
switch (packet.t) {
|
|
119
|
-
|
|
113
|
+
// Cases where we must obtain the old data before updating
|
|
120
114
|
case 'GUILD_MEMBER_UPDATE':
|
|
121
|
-
|
|
122
|
-
|
|
115
|
+
{
|
|
116
|
+
if (!this.memberUpdateHandler.check(packet.d)) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
await this.events?.execute(packet.t, packet, this, shardId);
|
|
123
120
|
}
|
|
124
|
-
await this.events?.execute(packet.t, packet, this, shardId);
|
|
125
121
|
break;
|
|
126
122
|
case 'PRESENCE_UPDATE':
|
|
127
|
-
|
|
128
|
-
|
|
123
|
+
{
|
|
124
|
+
if (!this.presenceUpdateHandler.check(packet.d)) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
await this.events?.execute(packet.t, packet, this, shardId);
|
|
129
128
|
}
|
|
130
|
-
await this.events?.execute(packet.t, packet, this, shardId);
|
|
131
129
|
break;
|
|
132
130
|
case 'GUILD_DELETE':
|
|
133
131
|
case 'GUILD_CREATE': {
|
|
134
|
-
if (this.__handleGuilds?.
|
|
135
|
-
this.__handleGuilds?.
|
|
136
|
-
if (!this.__handleGuilds?.
|
|
132
|
+
if (this.__handleGuilds?.includes(packet.d.id)) {
|
|
133
|
+
this.__handleGuilds?.splice(this.__handleGuilds.indexOf(packet.d.id), 1);
|
|
134
|
+
if (!this.__handleGuilds?.length && [...this.gateway.values()].every(shard => shard.data.session_id)) {
|
|
137
135
|
delete this.__handleGuilds;
|
|
138
|
-
await this.cache.onPacket
|
|
136
|
+
await this.cache.onPacket(packet);
|
|
139
137
|
return this.events?.runEvent('BOT_READY', this, this.me, -1);
|
|
140
138
|
}
|
|
141
|
-
if (!this.__handleGuilds?.
|
|
139
|
+
if (!this.__handleGuilds?.length)
|
|
142
140
|
delete this.__handleGuilds;
|
|
143
|
-
return this.cache.onPacket
|
|
141
|
+
return this.cache.onPacket(packet);
|
|
144
142
|
}
|
|
145
143
|
await this.events?.execute(packet.t, packet, this, shardId);
|
|
146
144
|
break;
|
|
@@ -149,24 +147,24 @@ class Client extends base_1.BaseClient {
|
|
|
149
147
|
default: {
|
|
150
148
|
switch (packet.t) {
|
|
151
149
|
case 'INTERACTION_CREATE':
|
|
152
|
-
|
|
153
|
-
|
|
150
|
+
{
|
|
151
|
+
await this.events?.execute(packet.t, packet, this, shardId);
|
|
152
|
+
await this.handleCommand.interaction(packet.d, shardId);
|
|
153
|
+
}
|
|
154
154
|
break;
|
|
155
155
|
case 'MESSAGE_CREATE':
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
case 'READY':
|
|
160
|
-
if (!this.__handleGuilds)
|
|
161
|
-
this.__handleGuilds = new Set();
|
|
162
|
-
for (const g of packet.d.guilds) {
|
|
163
|
-
this.__handleGuilds?.add(g.id);
|
|
156
|
+
{
|
|
157
|
+
await this.events?.execute(packet.t, packet, this, shardId);
|
|
158
|
+
await this.handleCommand.message(packet.d, shardId);
|
|
164
159
|
}
|
|
160
|
+
break;
|
|
161
|
+
case 'READY': {
|
|
162
|
+
const ids = packet.d.guilds.map(x => x.id);
|
|
163
|
+
this.__handleGuilds = this.__handleGuilds?.concat(ids) ?? ids;
|
|
165
164
|
this.botId = packet.d.user.id;
|
|
166
165
|
this.applicationId = packet.d.application.id;
|
|
167
166
|
this.me = transformers_1.Transformers.ClientUser(this, packet.d.user, packet.d.application);
|
|
168
|
-
if (!(this.
|
|
169
|
-
(this.gateway.options.intents & types_1.GatewayIntentBits.Guilds) === types_1.GatewayIntentBits.Guilds)) {
|
|
167
|
+
if (!(0, common_1.hasIntent)(this.gateway.options.intents, types_1.GatewayIntentBits.Guilds)) {
|
|
170
168
|
if ([...this.gateway.values()].every(shard => shard.data.session_id)) {
|
|
171
169
|
await this.events?.runEvent('BOT_READY', this, this.me, -1);
|
|
172
170
|
}
|
|
@@ -175,6 +173,7 @@ class Client extends base_1.BaseClient {
|
|
|
175
173
|
this.debugger?.debug(`#${shardId}[${packet.d.user.username}](${this.botId}) is online...`);
|
|
176
174
|
await this.events?.execute(packet.t, packet, this, shardId);
|
|
177
175
|
break;
|
|
176
|
+
}
|
|
178
177
|
default:
|
|
179
178
|
await this.events?.execute(packet.t, packet, this, shardId);
|
|
180
179
|
break;
|
package/lib/client/collectors.js
CHANGED
|
@@ -24,8 +24,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.Collectors = void 0;
|
|
27
|
-
const node_crypto_1 = require("node:crypto");
|
|
28
27
|
const node_console_1 = require("node:console");
|
|
28
|
+
const node_crypto_1 = require("node:crypto");
|
|
29
29
|
const RawEvents = __importStar(require("../events/hooks"));
|
|
30
30
|
class Collectors {
|
|
31
31
|
values = new Map();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { APIInteractionResponse, APIInteraction } from '../types';
|
|
2
1
|
import type { DeepPartial } from '../common';
|
|
2
|
+
import type { APIInteraction, APIInteractionResponse } from '../types';
|
|
3
3
|
import type { BaseClientOptions, StartOptions } from './base';
|
|
4
4
|
import { BaseClient } from './base';
|
|
5
5
|
export declare class HttpClient extends BaseClient {
|
package/lib/client/httpclient.js
CHANGED
|
@@ -21,10 +21,10 @@ class HttpClient extends base_1.BaseClient {
|
|
|
21
21
|
for (const [index, file] of files.entries()) {
|
|
22
22
|
const fileKey = file.key ?? `files[${index}]`;
|
|
23
23
|
if ((0, utils_1.isBufferLike)(file.data)) {
|
|
24
|
-
response.append(fileKey, new Blob([file.data], { type: file.contentType }), file.
|
|
24
|
+
response.append(fileKey, new Blob([file.data], { type: file.contentType }), file.filename);
|
|
25
25
|
}
|
|
26
26
|
else {
|
|
27
|
-
response.append(fileKey, new Blob([`${file.data}`], { type: file.contentType }), file.
|
|
27
|
+
response.append(fileKey, new Blob([`${file.data}`], { type: file.contentType }), file.filename);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
if (body) {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { ChannelType } from '../types';
|
|
2
1
|
import { type CustomStructures, OptionResolver } from '../commands';
|
|
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
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
5
|
import { GuildBan } from '../structures/GuildBan';
|
|
6
|
+
import type { ChannelType } from '../types';
|
|
6
7
|
export type PollStructure = InferCustomStructure<Poll, 'Poll'>;
|
|
7
8
|
export type ClientUserStructure = InferCustomStructure<ClientUser, 'ClientUser'>;
|
|
8
9
|
export type AnonymousGuildStructure = InferCustomStructure<AnonymousGuild, 'AnonymousGuild'>;
|
|
@@ -33,36 +34,38 @@ export type UserStructure = InferCustomStructure<User, 'User'>;
|
|
|
33
34
|
export type VoiceStateStructure = InferCustomStructure<VoiceState, 'VoiceState'>;
|
|
34
35
|
export type WebhookStructure = InferCustomStructure<Webhook, 'Webhook'>;
|
|
35
36
|
export type OptionResolverStructure = InferCustomStructure<OptionResolver, 'OptionResolver'>;
|
|
36
|
-
export
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
37
|
+
export type EntitlementStructure = InferCustomStructure<Entitlement, 'Entitlement'>;
|
|
38
|
+
export declare const Transformers: {
|
|
39
|
+
AnonymousGuild(client: import("../commands").UsingClient, data: import("../types").APIPartialGuild): AnonymousGuildStructure;
|
|
40
|
+
AutoModerationRule(client: import("../commands").UsingClient, data: import("../types").APIAutoModerationRule): AutoModerationRuleStructure;
|
|
41
|
+
BaseChannel(client: import("../commands").UsingClient, data: import("../types").APIChannelBase<ChannelType>): BaseChannelStructure;
|
|
42
|
+
BaseGuildChannel(client: import("../commands").UsingClient, data: import("../types").APIGuildChannel<ChannelType>): BaseGuildChannelStructure;
|
|
43
|
+
TextGuildChannel(client: import("../commands").UsingClient, data: import("../types").APIGuildChannel<ChannelType>): TextGuildChannelStructure;
|
|
44
|
+
DMChannel(...args: ConstructorParameters<typeof DMChannel>): DMChannelStructure;
|
|
45
|
+
VoiceChannel(client: import("../commands").UsingClient, data: import("../types").APIChannelBase<ChannelType>): VoiceChannelStructure;
|
|
46
|
+
StageChannel(client: import("../commands").UsingClient, data: import("../types").APIChannelBase<ChannelType>): StageChannelStructure;
|
|
47
|
+
MediaChannel(client: import("../commands").UsingClient, data: import("../types").APIChannelBase<ChannelType>): MediaChannelStructure;
|
|
48
|
+
ForumChannel(client: import("../commands").UsingClient, data: import("../types").APIChannelBase<ChannelType>): ForumChannelStructure;
|
|
49
|
+
ThreadChannel(client: import("../commands").UsingClient, data: import("../types").APIChannelBase<ChannelType>): ThreadChannelStructure;
|
|
50
|
+
CategoryChannel(...args: ConstructorParameters<typeof CategoryChannel>): CategoryChannelStructure;
|
|
51
|
+
NewsChannel(client: import("../commands").UsingClient, data: import("../types").APIChannelBase<ChannelType>): NewsChannelStructure;
|
|
52
|
+
DirectoryChannel(client: import("../commands").UsingClient, data: import("../types").APIChannelBase<ChannelType>): DirectoryChannelStructure;
|
|
53
|
+
ClientUser(client: import("../commands").UsingClient, data: import("../types").APIUser, application: Pick<import("../types").APIApplication, "id" | "flags">): ClientUserStructure;
|
|
54
|
+
Guild<State extends StructStates = "api">(client: import("../commands").UsingClient, data: import("../types").APIGuild | import("../types").GatewayGuildCreateDispatchData): GuildStructure<State>;
|
|
55
|
+
GuildBan(client: import("../commands").UsingClient, data: import("../types").APIBan, guildId: string): GuildBanStructure;
|
|
56
|
+
GuildEmoji(client: import("../commands").UsingClient, data: import("../types").APIEmoji, guildId: string): GuildEmojiStructure;
|
|
57
|
+
GuildMember(client: import("../commands").UsingClient, data: import("../structures").GuildMemberData, user: import("../types").APIUser, guildId: string): GuildMemberStructure;
|
|
58
|
+
InteractionGuildMember(client: import("../commands").UsingClient, data: import("../types").APIInteractionDataResolvedGuildMember, user: import("../types").APIUser, guildId: string): InteractionGuildMemberStructure;
|
|
59
|
+
GuildRole(client: import("../commands").UsingClient, data: import("../types").APIRole, guildId: string): GuildRoleStructure;
|
|
60
|
+
GuildTemplate(client: import("../commands").UsingClient, data: import("../types").APITemplate): GuildTemplateStructure;
|
|
61
|
+
Message(client: import("../commands").UsingClient, data: import("../structures").MessageData): MessageStructure;
|
|
62
|
+
WebhookMessage(client: import("../commands").UsingClient, data: import("../structures").MessageData, webhookId: string, webhookToken: string): WebhookMessageStructure;
|
|
63
|
+
Poll(client: import("../commands").UsingClient, data: import("../types").APIPoll, channelId: string, messageId: string): PollStructure;
|
|
64
|
+
Sticker(client: import("../commands").UsingClient, data: import("../types").APISticker): StickerStructure;
|
|
65
|
+
User(client: import("../commands").UsingClient, data: import("../types").APIUser): UserStructure;
|
|
66
|
+
VoiceState(client: import("../commands").UsingClient, data: import("../types").APIVoiceState): VoiceStateStructure;
|
|
67
|
+
Webhook(client: import("../commands").UsingClient, data: import("../types").APIWebhook): WebhookStructure;
|
|
68
|
+
OptionResolver(client: import("../commands").UsingClient, options: import("../types").APIApplicationCommandInteractionDataOption[], parent?: import("../commands").Command | undefined, guildId?: string | undefined, resolved?: import("../commands").ContextOptionsResolved | undefined): OptionResolverStructure;
|
|
69
|
+
Entitlement(client: import("../commands").UsingClient, data: import("../types").APIEntitlement): EntitlementStructure;
|
|
70
|
+
};
|
|
68
71
|
export type InferCustomStructure<T, N extends string> = CustomStructures extends Record<N, infer P> ? P : T;
|
|
@@ -3,97 +3,100 @@ 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");
|
|
6
7
|
const GuildBan_1 = require("../structures/GuildBan");
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
exports.Transformers = {
|
|
9
|
+
AnonymousGuild(...args) {
|
|
9
10
|
return new structures_1.AnonymousGuild(...args);
|
|
10
|
-
}
|
|
11
|
-
|
|
11
|
+
},
|
|
12
|
+
AutoModerationRule(...args) {
|
|
12
13
|
return new structures_1.AutoModerationRule(...args);
|
|
13
|
-
}
|
|
14
|
-
|
|
14
|
+
},
|
|
15
|
+
BaseChannel(...args) {
|
|
15
16
|
return new structures_1.BaseChannel(...args);
|
|
16
|
-
}
|
|
17
|
-
|
|
17
|
+
},
|
|
18
|
+
BaseGuildChannel(...args) {
|
|
18
19
|
return new structures_1.BaseGuildChannel(...args);
|
|
19
|
-
}
|
|
20
|
-
|
|
20
|
+
},
|
|
21
|
+
TextGuildChannel(...args) {
|
|
21
22
|
return new structures_1.TextGuildChannel(...args);
|
|
22
|
-
}
|
|
23
|
-
|
|
23
|
+
},
|
|
24
|
+
DMChannel(...args) {
|
|
24
25
|
return new structures_1.DMChannel(...args);
|
|
25
|
-
}
|
|
26
|
-
|
|
26
|
+
},
|
|
27
|
+
VoiceChannel(...args) {
|
|
27
28
|
return new structures_1.VoiceChannel(...args);
|
|
28
|
-
}
|
|
29
|
-
|
|
29
|
+
},
|
|
30
|
+
StageChannel(...args) {
|
|
30
31
|
return new structures_1.StageChannel(...args);
|
|
31
|
-
}
|
|
32
|
-
|
|
32
|
+
},
|
|
33
|
+
MediaChannel(...args) {
|
|
33
34
|
return new structures_1.MediaChannel(...args);
|
|
34
|
-
}
|
|
35
|
-
|
|
35
|
+
},
|
|
36
|
+
ForumChannel(...args) {
|
|
36
37
|
return new structures_1.ForumChannel(...args);
|
|
37
|
-
}
|
|
38
|
-
|
|
38
|
+
},
|
|
39
|
+
ThreadChannel(...args) {
|
|
39
40
|
return new structures_1.ThreadChannel(...args);
|
|
40
|
-
}
|
|
41
|
-
|
|
41
|
+
},
|
|
42
|
+
CategoryChannel(...args) {
|
|
42
43
|
return new structures_1.CategoryChannel(...args);
|
|
43
|
-
}
|
|
44
|
-
|
|
44
|
+
},
|
|
45
|
+
NewsChannel(...args) {
|
|
45
46
|
return new structures_1.NewsChannel(...args);
|
|
46
|
-
}
|
|
47
|
-
|
|
47
|
+
},
|
|
48
|
+
DirectoryChannel(...args) {
|
|
48
49
|
return new structures_1.DirectoryChannel(...args);
|
|
49
|
-
}
|
|
50
|
-
|
|
50
|
+
},
|
|
51
|
+
ClientUser(...args) {
|
|
51
52
|
return new structures_1.ClientUser(...args);
|
|
52
|
-
}
|
|
53
|
-
|
|
53
|
+
},
|
|
54
|
+
Guild(...args) {
|
|
54
55
|
return new structures_1.Guild(...args);
|
|
55
|
-
}
|
|
56
|
-
|
|
56
|
+
},
|
|
57
|
+
GuildBan(...args) {
|
|
57
58
|
return new GuildBan_1.GuildBan(...args);
|
|
58
|
-
}
|
|
59
|
-
|
|
59
|
+
},
|
|
60
|
+
GuildEmoji(...args) {
|
|
60
61
|
return new structures_1.GuildEmoji(...args);
|
|
61
|
-
}
|
|
62
|
-
|
|
62
|
+
},
|
|
63
|
+
GuildMember(...args) {
|
|
63
64
|
return new structures_1.GuildMember(...args);
|
|
64
|
-
}
|
|
65
|
-
|
|
65
|
+
},
|
|
66
|
+
InteractionGuildMember(...args) {
|
|
66
67
|
return new structures_1.InteractionGuildMember(...args);
|
|
67
|
-
}
|
|
68
|
-
|
|
68
|
+
},
|
|
69
|
+
GuildRole(...args) {
|
|
69
70
|
return new structures_1.GuildRole(...args);
|
|
70
|
-
}
|
|
71
|
-
|
|
71
|
+
},
|
|
72
|
+
GuildTemplate(...args) {
|
|
72
73
|
return new structures_1.GuildTemplate(...args);
|
|
73
|
-
}
|
|
74
|
-
|
|
74
|
+
},
|
|
75
|
+
Message(...args) {
|
|
75
76
|
return new structures_1.Message(...args);
|
|
76
|
-
}
|
|
77
|
-
|
|
77
|
+
},
|
|
78
|
+
WebhookMessage(...args) {
|
|
78
79
|
return new structures_1.WebhookMessage(...args);
|
|
79
|
-
}
|
|
80
|
-
|
|
80
|
+
},
|
|
81
|
+
Poll(...args) {
|
|
81
82
|
return new structures_1.Poll(...args);
|
|
82
|
-
}
|
|
83
|
-
|
|
83
|
+
},
|
|
84
|
+
Sticker(...args) {
|
|
84
85
|
return new structures_1.Sticker(...args);
|
|
85
|
-
}
|
|
86
|
-
|
|
86
|
+
},
|
|
87
|
+
User(...args) {
|
|
87
88
|
return new structures_1.User(...args);
|
|
88
|
-
}
|
|
89
|
-
|
|
89
|
+
},
|
|
90
|
+
VoiceState(...args) {
|
|
90
91
|
return new structures_1.VoiceState(...args);
|
|
91
|
-
}
|
|
92
|
-
|
|
92
|
+
},
|
|
93
|
+
Webhook(...args) {
|
|
93
94
|
return new structures_1.Webhook(...args);
|
|
94
|
-
}
|
|
95
|
-
|
|
95
|
+
},
|
|
96
|
+
OptionResolver(...args) {
|
|
96
97
|
return new commands_1.OptionResolver(...args);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
},
|
|
99
|
+
Entitlement(...args) {
|
|
100
|
+
return new Entitlement_1.Entitlement(...args);
|
|
101
|
+
},
|
|
102
|
+
};
|