seyfert 3.2.1-dev-15624887796.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/Routes/guilds.d.ts +1 -1
- package/lib/api/api.d.ts +1 -1
- package/lib/api/api.js +1 -1
- package/lib/api/index.d.ts +1 -1
- package/lib/api/index.js +1 -1
- package/lib/builders/Container.d.ts +1 -1
- package/lib/builders/Container.js +1 -1
- package/lib/builders/Section.d.ts +1 -1
- package/lib/builders/Section.js +1 -1
- package/lib/cache/index.d.ts +4 -4
- package/lib/cache/index.js +2 -2
- package/lib/cache/resources/guilds.d.ts +1 -1
- package/lib/client/base.d.ts +1 -1
- package/lib/client/base.js +3 -3
- package/lib/client/index.d.ts +1 -1
- package/lib/client/index.js +1 -1
- package/lib/client/transformers.d.ts +1 -1
- package/lib/client/workerclient.d.ts +4 -4
- package/lib/client/workerclient.js +1 -1
- package/lib/commands/applications/menucontext.js +0 -1
- package/lib/commands/applications/options.d.ts +1 -1
- package/lib/commands/applications/shared.d.ts +1 -1
- package/lib/commands/handle.d.ts +2 -2
- package/lib/commands/handle.js +1 -1
- package/lib/commands/handler.d.ts +1 -1
- package/lib/commands/index.d.ts +3 -3
- package/lib/commands/index.js +3 -3
- package/lib/common/index.d.ts +8 -8
- package/lib/common/index.js +12 -12
- package/lib/common/it/utils.d.ts +1 -1
- package/lib/common/it/utils.js +1 -3
- package/lib/common/shorters/messages.d.ts +1 -1
- package/lib/common/shorters/messages.js +1 -1
- package/lib/common/shorters/threads.d.ts +3 -2
- package/lib/common/shorters/threads.js +23 -12
- package/lib/common/types/options.d.ts +1 -1
- package/lib/common/types/resolvables.d.ts +1 -1
- package/lib/components/Container.d.ts +1 -1
- package/lib/components/componentcommand.d.ts +1 -1
- package/lib/components/componentcommand.js +5 -2
- package/lib/components/handler.d.ts +1 -0
- package/lib/components/handler.js +17 -0
- package/lib/events/hooks/channel.d.ts +1 -1
- package/lib/events/hooks/guild.d.ts +1 -1
- package/lib/events/hooks/index.d.ts +1 -1
- package/lib/events/hooks/index.js +1 -1
- package/lib/events/hooks/interactions.d.ts +1 -1
- package/lib/events/hooks/presence.d.ts +1 -1
- package/lib/events/hooks/soundboard.d.ts +1 -1
- package/lib/events/hooks/thread.d.ts +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.js +10 -10
- package/lib/langs/router.d.ts +1 -1
- package/lib/langs/router.js +3 -1
- package/lib/structures/Guild.d.ts +2 -1
- package/lib/structures/Guild.js +5 -2
- package/lib/structures/GuildBan.d.ts +1 -1
- package/lib/structures/Interaction.d.ts +2 -2
- package/lib/structures/Interaction.js +1 -2
- package/lib/structures/Message.d.ts +1 -1
- package/lib/structures/Message.js +1 -2
- package/lib/structures/channels.d.ts +2 -2
- package/lib/structures/index.d.ts +5 -5
- package/lib/structures/index.js +5 -5
- package/lib/types/index.d.ts +1 -1
- package/lib/types/index.js +1 -1
- package/lib/types/payloads/_interactions/base.d.ts +1 -1
- package/lib/types/payloads/application.d.ts +2 -2
- package/lib/types/payloads/components.d.ts +1 -1
- package/lib/types/payloads/index.d.ts +4 -4
- package/lib/types/payloads/index.js +4 -4
- package/lib/types/rest/index.d.ts +2 -2
- package/lib/types/rest/index.js +2 -2
- package/lib/websocket/SharedTypes.d.ts +1 -1
- package/lib/websocket/discord/shard.js +0 -1
- package/lib/websocket/index.d.ts +1 -1
- package/lib/websocket/index.js +1 -1
- package/package.json +4 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Identify, OmitInsert } from '../../common';
|
|
2
|
-
import type { APIThreadChannel, RESTDeleteAPIAutoModerationRuleResult, RESTDeleteAPIGuildBanResult, RESTDeleteAPIGuildEmojiResult, RESTDeleteAPIGuildIntegrationResult, RESTDeleteAPIGuildMemberResult, RESTDeleteAPIGuildMemberRoleResult, RESTDeleteAPIGuildResult, RESTDeleteAPIGuildRoleResult, RESTDeleteAPIGuildScheduledEventResult, RESTDeleteAPIGuildStickerResult, RESTDeleteAPIGuildTemplateResult, RESTGetAPIAuditLogQuery, RESTGetAPIAuditLogResult, RESTGetAPIAutoModerationRuleResult, RESTGetAPIAutoModerationRulesResult, RESTGetAPICurrentUserVoiceState, RESTGetAPIGuildBanResult, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTGetAPIGuildChannelsResult, RESTGetAPIGuildEmojiResult, RESTGetAPIGuildEmojisResult, RESTGetAPIGuildIntegrationsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTGetAPIGuildPreviewResult, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTGetAPIGuildQuery, RESTGetAPIGuildResult, RESTGetAPIGuildRoleResult, RESTGetAPIGuildRolesResult, RESTGetAPIGuildScheduledEventQuery, RESTGetAPIGuildScheduledEventResult,
|
|
2
|
+
import type { APIThreadChannel, RESTDeleteAPIAutoModerationRuleResult, RESTDeleteAPIGuildBanResult, RESTDeleteAPIGuildEmojiResult, RESTDeleteAPIGuildIntegrationResult, RESTDeleteAPIGuildMemberResult, RESTDeleteAPIGuildMemberRoleResult, RESTDeleteAPIGuildResult, RESTDeleteAPIGuildRoleResult, RESTDeleteAPIGuildScheduledEventResult, RESTDeleteAPIGuildStickerResult, RESTDeleteAPIGuildTemplateResult, RESTGetAPIAuditLogQuery, RESTGetAPIAuditLogResult, RESTGetAPIAutoModerationRuleResult, RESTGetAPIAutoModerationRulesResult, RESTGetAPICurrentUserVoiceState, RESTGetAPIGuildBanResult, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTGetAPIGuildChannelsResult, RESTGetAPIGuildEmojiResult, RESTGetAPIGuildEmojisResult, RESTGetAPIGuildIntegrationsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTGetAPIGuildPreviewResult, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTGetAPIGuildQuery, RESTGetAPIGuildResult, RESTGetAPIGuildRoleResult, RESTGetAPIGuildRolesResult, RESTGetAPIGuildScheduledEventQuery, RESTGetAPIGuildScheduledEventResult, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildSoundboardSoundsResult, RESTGetAPIGuildStickerResult, RESTGetAPIGuildStickersResult, RESTGetAPIGuildTemplatesResult, RESTGetAPIGuildThreadsResult, RESTGetAPIGuildVanityUrlResult, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildWebhooksResult, RESTGetAPIGuildWelcomeScreenResult, RESTGetAPIGuildWidgetImageQuery, RESTGetAPIGuildWidgetImageResult, RESTGetAPIGuildWidgetJSONResult, RESTGetAPIGuildWidgetSettingsResult, RESTGetAPITemplateResult, RESTGetAPIUserVoiceState, RESTPatchAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleResult, RESTPatchAPICurrentGuildMemberJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTPatchAPIGuildChannelPositionsResult, RESTPatchAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiResult, RESTPatchAPIGuildJSONBody, RESTPatchAPIGuildMemberJSONBody, RESTPatchAPIGuildMemberResult, RESTPatchAPIGuildResult, RESTPatchAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleResult, RESTPatchAPIGuildScheduledEventJSONBody, RESTPatchAPIGuildScheduledEventResult, RESTPatchAPIGuildSoundboardSound, RESTPatchAPIGuildSoundboardSoundResult, RESTPatchAPIGuildStickerJSONBody, RESTPatchAPIGuildStickerResult, RESTPatchAPIGuildTemplateJSONBody, RESTPatchAPIGuildTemplateResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPatchAPIGuildVoiceStateCurrentMemberResult, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTPatchAPIGuildVoiceStateUserResult, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildWelcomeScreenResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTPatchAPIGuildWidgetSettingsResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPostAPIAutoModerationRuleResult, RESTPostAPIGuildBulkBanJSONBody, RESTPostAPIGuildBulkBanResult, RESTPostAPIGuildChannelJSONBody, RESTPostAPIGuildChannelResult, RESTPostAPIGuildEmojiJSONBody, RESTPostAPIGuildEmojiResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, RESTPostAPIGuildRoleJSONBody, RESTPostAPIGuildRoleResult, RESTPostAPIGuildScheduledEventJSONBody, RESTPostAPIGuildScheduledEventResult, RESTPostAPIGuildSoundboardSound, RESTPostAPIGuildSoundboardSoundResult, RESTPostAPIGuildStickerFormDataBody, RESTPostAPIGuildStickerResult, RESTPostAPIGuildsJSONBody, RESTPostAPIGuildsMFAJSONBody, RESTPostAPIGuildsMFAResult, RESTPostAPIGuildsResult, RESTPostAPIGuildTemplatesJSONBody, RESTPostAPIGuildTemplatesResult, RESTPostAPITemplateCreateGuildJSONBody, RESTPostAPITemplateCreateGuildResult, RESTPutAPIGuildBanJSONBody, RESTPutAPIGuildBanResult, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTPutAPIGuildMemberRoleResult, RESTPutAPIGuildTemplateSyncResult } from '../../types';
|
|
3
3
|
import type { RestArguments, RestArgumentsNoBody } from '../api';
|
|
4
4
|
import type { RawFile } from '../shared';
|
|
5
5
|
export interface GuildRoutes {
|
package/lib/api/api.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type UUID } from 'node:crypto';
|
|
2
2
|
import { type Awaitable, Logger } from '../common';
|
|
3
3
|
import type { WorkerSendApiRequest } from '../websocket/discord/worker';
|
|
4
|
-
import type { APIRoutes } from './Routes';
|
|
5
4
|
import { Bucket } from './bucket';
|
|
5
|
+
import type { APIRoutes } from './Routes';
|
|
6
6
|
import { type ApiHandlerInternalOptions, type ApiHandlerOptions, type ApiRequestOptions, type HttpMethods, type RawFile, type RequestHeaders } from './shared';
|
|
7
7
|
export interface ApiHandler {
|
|
8
8
|
debugger?: Logger;
|
package/lib/api/api.js
CHANGED
|
@@ -4,8 +4,8 @@ exports.ApiHandler = void 0;
|
|
|
4
4
|
const node_crypto_1 = require("node:crypto");
|
|
5
5
|
const common_1 = require("../common");
|
|
6
6
|
const utils_1 = require("../common/it/utils");
|
|
7
|
-
const Router_1 = require("./Router");
|
|
8
7
|
const bucket_1 = require("./bucket");
|
|
8
|
+
const Router_1 = require("./Router");
|
|
9
9
|
const shared_1 = require("./shared");
|
|
10
10
|
const utils_2 = require("./utils/utils");
|
|
11
11
|
class ApiHandler {
|
package/lib/api/index.d.ts
CHANGED
package/lib/api/index.js
CHANGED
|
@@ -14,7 +14,7 @@ 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
|
+
__exportStar(require("./api"), exports);
|
|
17
18
|
__exportStar(require("./Router"), exports);
|
|
18
19
|
__exportStar(require("./Routes"), exports);
|
|
19
|
-
__exportStar(require("./api"), exports);
|
|
20
20
|
__exportStar(require("./shared"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ActionRow } from '.';
|
|
2
1
|
import { type ColorResolvable, type RestOrArray } from '../common';
|
|
3
2
|
import { type APIContainerComponent } from '../types';
|
|
3
|
+
import { type ActionRow } from '.';
|
|
4
4
|
import { BaseComponentBuilder } from './Base';
|
|
5
5
|
import type { File } from './File';
|
|
6
6
|
import type { MediaGallery } from './MediaGallery';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Container = void 0;
|
|
4
|
-
const _1 = require(".");
|
|
5
4
|
const common_1 = require("../common");
|
|
6
5
|
const types_1 = require("../types");
|
|
6
|
+
const _1 = require(".");
|
|
7
7
|
const Base_1 = require("./Base");
|
|
8
8
|
/**
|
|
9
9
|
* Represents a container component builder.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type Button } from '.';
|
|
2
1
|
import type { RestOrArray } from '../common';
|
|
3
2
|
import { type APISectionComponent } from '../types';
|
|
3
|
+
import { type Button } from '.';
|
|
4
4
|
import { BaseComponentBuilder } from './Base';
|
|
5
5
|
import type { TextDisplay } from './TextDisplay';
|
|
6
6
|
import type { Thumbnail } from './Thumbnail';
|
package/lib/builders/Section.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Section = void 0;
|
|
4
|
-
const _1 = require(".");
|
|
5
4
|
const types_1 = require("../types");
|
|
5
|
+
const _1 = require(".");
|
|
6
6
|
const Base_1 = require("./Base");
|
|
7
7
|
class Section extends Base_1.BaseComponentBuilder {
|
|
8
8
|
components;
|
package/lib/cache/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { type If, Logger } from '../common';
|
|
2
|
-
import type { Adapter } from './adapters';
|
|
3
|
-
import { Guilds } from './resources/guilds';
|
|
4
|
-
import { Users } from './resources/users';
|
|
5
1
|
import type { InternalOptions, UsingClient } from '../commands';
|
|
2
|
+
import { type If, Logger } from '../common';
|
|
6
3
|
import { type GatewayDispatchPayload, GatewayIntentBits } from '../types';
|
|
4
|
+
import type { Adapter } from './adapters';
|
|
7
5
|
import { Bans } from './resources/bans';
|
|
8
6
|
import { Channels } from './resources/channels';
|
|
9
7
|
import { Emojis } from './resources/emojis';
|
|
8
|
+
import { Guilds } from './resources/guilds';
|
|
10
9
|
import { Members } from './resources/members';
|
|
11
10
|
import { Messages } from './resources/messages';
|
|
12
11
|
import { Overwrites } from './resources/overwrites';
|
|
@@ -14,6 +13,7 @@ import { Presences } from './resources/presence';
|
|
|
14
13
|
import { Roles } from './resources/roles';
|
|
15
14
|
import { StageInstances } from './resources/stage-instances';
|
|
16
15
|
import { Stickers } from './resources/stickers';
|
|
16
|
+
import { Users } from './resources/users';
|
|
17
17
|
import { VoiceStates } from './resources/voice-states';
|
|
18
18
|
export { BaseResource } from './resources/default/base';
|
|
19
19
|
export { GuildBasedResource } from './resources/default/guild-based';
|
package/lib/cache/index.js
CHANGED
|
@@ -16,12 +16,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.CacheFrom = exports.Cache = exports.GuildRelatedResource = exports.GuildBasedResource = exports.BaseResource = void 0;
|
|
18
18
|
const common_1 = require("../common");
|
|
19
|
-
const guilds_1 = require("./resources/guilds");
|
|
20
|
-
const users_1 = require("./resources/users");
|
|
21
19
|
const types_1 = require("../types");
|
|
22
20
|
const bans_1 = require("./resources/bans");
|
|
23
21
|
const channels_1 = require("./resources/channels");
|
|
24
22
|
const emojis_1 = require("./resources/emojis");
|
|
23
|
+
const guilds_1 = require("./resources/guilds");
|
|
25
24
|
const members_1 = require("./resources/members");
|
|
26
25
|
const messages_1 = require("./resources/messages");
|
|
27
26
|
const overwrites_1 = require("./resources/overwrites");
|
|
@@ -29,6 +28,7 @@ const presence_1 = require("./resources/presence");
|
|
|
29
28
|
const roles_1 = require("./resources/roles");
|
|
30
29
|
const stage_instances_1 = require("./resources/stage-instances");
|
|
31
30
|
const stickers_1 = require("./resources/stickers");
|
|
31
|
+
const users_1 = require("./resources/users");
|
|
32
32
|
const voice_states_1 = require("./resources/voice-states");
|
|
33
33
|
var base_1 = require("./resources/default/base");
|
|
34
34
|
Object.defineProperty(exports, "BaseResource", { enumerable: true, get: function () { return base_1.BaseResource; } });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { CacheFrom, ReturnCache } from '..';
|
|
2
1
|
import { type GuildStructure } from '../../client/transformers';
|
|
3
2
|
import type { APIGuild, GatewayGuildCreateDispatchData } from '../../types';
|
|
3
|
+
import type { CacheFrom, ReturnCache } from '..';
|
|
4
4
|
import { BaseResource } from './default/base';
|
|
5
5
|
export declare class Guilds extends BaseResource<any, APIGuild | GatewayGuildCreateDispatchData> {
|
|
6
6
|
namespace: string;
|
package/lib/client/base.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ import type { Adapter, DisabledCache } from '../cache';
|
|
|
3
3
|
import { Cache } from '../cache';
|
|
4
4
|
import type { Command, CommandContext, ContextMenuCommand, ExtendedRC, ExtendedRCLocations, ExtraProps, MenuCommandContext, RegisteredMiddlewares, SubCommand, UsingClient } from '../commands';
|
|
5
5
|
import { type InferWithPrefix, type MiddlewareContext } from '../commands/applications/shared';
|
|
6
|
+
import { HandleCommand } from '../commands/handle';
|
|
6
7
|
import { CommandHandler } from '../commands/handler';
|
|
7
8
|
import { ApplicationShorter, ChannelShorter, EmojiShorter, GuildShorter, InteractionShorter, InvitesShorter, Logger, type MakeRequired, MemberShorter, MessageShorter, ReactionShorter, RoleShorter, TemplateShorter, ThreadShorter, UsersShorter, WebhookShorter } from '../common';
|
|
8
|
-
import { HandleCommand } from '../commands/handle';
|
|
9
9
|
import { BanShorter } from '../common/shorters/bans';
|
|
10
10
|
import { SoundboardShorter } from '../common/shorters/soundboard';
|
|
11
11
|
import { VoiceStateShorter } from '../common/shorters/voiceStates';
|
package/lib/client/base.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BaseClient = void 0;
|
|
4
|
+
const node_fs_1 = require("node:fs");
|
|
4
5
|
const node_path_1 = require("node:path");
|
|
5
6
|
const api_1 = require("../api");
|
|
7
|
+
const utils_1 = require("../api/utils/utils");
|
|
6
8
|
const cache_1 = require("../cache");
|
|
7
9
|
const shared_1 = require("../commands/applications/shared");
|
|
10
|
+
const handle_1 = require("../commands/handle");
|
|
8
11
|
const handler_1 = require("../commands/handler");
|
|
9
12
|
const common_1 = require("../common");
|
|
10
|
-
const node_fs_1 = require("node:fs");
|
|
11
|
-
const utils_1 = require("../api/utils/utils");
|
|
12
|
-
const handle_1 = require("../commands/handle");
|
|
13
13
|
const bans_1 = require("../common/shorters/bans");
|
|
14
14
|
const soundboard_1 = require("../common/shorters/soundboard");
|
|
15
15
|
const voiceStates_1 = require("../common/shorters/voiceStates");
|
package/lib/client/index.d.ts
CHANGED
package/lib/client/index.js
CHANGED
|
@@ -16,5 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./client"), exports);
|
|
18
18
|
__exportStar(require("./httpclient"), exports);
|
|
19
|
-
__exportStar(require("./workerclient"), exports);
|
|
20
19
|
__exportStar(require("./transformers"), exports);
|
|
20
|
+
__exportStar(require("./workerclient"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type CustomStructures, OptionResolver } from '../commands';
|
|
2
2
|
import type { StructStates } from '../common/';
|
|
3
|
-
import { AnonymousGuild, ApplicationEmoji, AutoModerationRule, BaseChannel, BaseGuildChannel, CategoryChannel, ClientUser,
|
|
3
|
+
import { AnonymousGuild, ApplicationEmoji, AutoModerationRule, BaseChannel, BaseGuildChannel, CategoryChannel, ClientUser, DirectoryChannel, DMChannel, Emoji, Entitlement, ForumChannel, Guild, GuildBan, GuildEmoji, GuildMember, GuildRole, GuildTemplate, InteractionGuildMember, MediaChannel, Message, NewsChannel, Poll, StageChannel, Sticker, TextGuildChannel, ThreadChannel, User, VoiceChannel, VoiceState, Webhook, WebhookMessage } from '../structures';
|
|
4
4
|
import { Application } from '../structures/Application';
|
|
5
5
|
import type { ChannelType } from '../types';
|
|
6
6
|
export type PollStructure = InferCustomStructure<Poll, 'Poll'>;
|
|
@@ -2,15 +2,15 @@ import { type Awaitable, type DeepPartial, type MakeRequired, type When } from '
|
|
|
2
2
|
import { EventHandler } from '../events';
|
|
3
3
|
import type { GatewayDispatchPayload } from '../types';
|
|
4
4
|
import { Shard, type ShardManagerOptions, type WorkerData } from '../websocket';
|
|
5
|
+
import { MemberUpdateHandler } from '../websocket/discord/events/memberUpdate';
|
|
6
|
+
import { PresenceUpdateHandler } from '../websocket/discord/events/presenceUpdate';
|
|
7
|
+
import type { WorkerHeartbeaterMessages } from '../websocket/discord/heartbeater';
|
|
8
|
+
import type { ShardData } from '../websocket/discord/shared';
|
|
5
9
|
import type { ClientHeartbeaterMessages, WorkerMessages, WorkerShardInfo } from '../websocket/discord/worker';
|
|
6
10
|
import type { ManagerMessages, ManagerSpawnShards } from '../websocket/discord/workermanager';
|
|
7
11
|
import type { BaseClientOptions, ServicesOptions, StartOptions } from './base';
|
|
8
12
|
import { BaseClient } from './base';
|
|
9
13
|
import type { Client, ClientOptions } from './client';
|
|
10
|
-
import { MemberUpdateHandler } from '../websocket/discord/events/memberUpdate';
|
|
11
|
-
import { PresenceUpdateHandler } from '../websocket/discord/events/presenceUpdate';
|
|
12
|
-
import type { WorkerHeartbeaterMessages } from '../websocket/discord/heartbeater';
|
|
13
|
-
import type { ShardData } from '../websocket/discord/shared';
|
|
14
14
|
import { Collectors } from './collectors';
|
|
15
15
|
import { type ClientUserStructure } from './transformers';
|
|
16
16
|
export declare class WorkerClient<Ready extends boolean = boolean> extends BaseClient {
|
|
@@ -8,9 +8,9 @@ const cache_1 = require("../cache");
|
|
|
8
8
|
const common_1 = require("../common");
|
|
9
9
|
const events_1 = require("../events");
|
|
10
10
|
const websocket_1 = require("../websocket");
|
|
11
|
-
const base_1 = require("./base");
|
|
12
11
|
const memberUpdate_1 = require("../websocket/discord/events/memberUpdate");
|
|
13
12
|
const presenceUpdate_1 = require("../websocket/discord/events/presenceUpdate");
|
|
13
|
+
const base_1 = require("./base");
|
|
14
14
|
const collectors_1 = require("./collectors");
|
|
15
15
|
const transformers_1 = require("./transformers");
|
|
16
16
|
let workerData;
|
|
@@ -19,7 +19,6 @@ class MenuCommandContext extends basecontext_1.BaseContext {
|
|
|
19
19
|
}
|
|
20
20
|
metadata = {};
|
|
21
21
|
globalMetadata = {};
|
|
22
|
-
// biome-ignore lint/suspicious/useGetterReturn: default don't exist.
|
|
23
22
|
get target() {
|
|
24
23
|
switch (this.interaction.data.type) {
|
|
25
24
|
case types_1.ApplicationCommandType.Message: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { AutocompleteCallback, EntryPointContext, MenuCommandContext, OnAutocompleteErrorCallback, ReturnOptionsTypes } from '..';
|
|
2
1
|
import type { Awaitable, FlatObjectKeys } from '../../common';
|
|
3
2
|
import type { ModalContext } from '../../components';
|
|
4
3
|
import type { ComponentContext } from '../../components/componentcontext';
|
|
5
4
|
import type { MessageCommandInteraction, UserCommandInteraction } from '../../structures';
|
|
6
5
|
import { type APIApplicationCommandBasicOption, type APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from '../../types';
|
|
7
6
|
import type { LocalizationMap } from '../../types/payloads';
|
|
7
|
+
import type { AutocompleteCallback, EntryPointContext, MenuCommandContext, OnAutocompleteErrorCallback, ReturnOptionsTypes } from '..';
|
|
8
8
|
import type { CommandContext } from './chatcontext';
|
|
9
9
|
import type { DefaultLocale, MiddlewareContext, OKFunction, SeyfertChannelMap, StopFunction } from './shared';
|
|
10
10
|
export interface SeyfertBasicOption<T extends keyof ReturnOptionsTypes, R = true | false> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CategoryChannelStructure,
|
|
1
|
+
import type { CategoryChannelStructure, DirectoryChannelStructure, DMChannelStructure, ForumChannelStructure, MediaChannelStructure, NewsChannelStructure, StageChannelStructure, TextGuildChannelStructure, ThreadChannelStructure, VoiceChannelStructure } from '../../client';
|
|
2
2
|
import type { BaseClient } from '../../client/base';
|
|
3
3
|
import type { IsStrictlyUndefined } from '../../common';
|
|
4
4
|
import { ChannelType } from '../../types';
|
package/lib/commands/handle.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Command, type CommandAutocompleteOption, CommandContext, type CommandOption, type ContextMenuCommand, type ContextOptionsResolved, type EntryPointCommand, EntryPointContext, MenuCommandContext, type MessageCommandOptionErrors, SubCommand, type UsingClient } from '.';
|
|
2
1
|
import { type MessageStructure, type OptionResolverStructure, Transformers } from '../client/transformers';
|
|
3
2
|
import type { MakeRequired } from '../common';
|
|
4
|
-
import { AutocompleteInteraction, type ChatInputCommandInteraction, type ComponentInteraction, type EntryPointInteraction, type MessageCommandInteraction, type ModalSubmitInteraction, type UserCommandInteraction
|
|
3
|
+
import { type __InternalReplyFunction, AutocompleteInteraction, type ChatInputCommandInteraction, type ComponentInteraction, type EntryPointInteraction, type MessageCommandInteraction, type ModalSubmitInteraction, type UserCommandInteraction } from '../structures';
|
|
5
4
|
import type { PermissionsBitField } from '../structures/extra/Permissions';
|
|
6
5
|
import { type APIApplicationCommandInteraction, type APIApplicationCommandInteractionDataOption, type APIInteraction, ApplicationCommandOptionType, type GatewayMessageCreateDispatchData } from '../types';
|
|
6
|
+
import { Command, type CommandAutocompleteOption, CommandContext, type CommandOption, type ContextMenuCommand, type ContextOptionsResolved, type EntryPointCommand, EntryPointContext, MenuCommandContext, type MessageCommandOptionErrors, SubCommand, type UsingClient } from '.';
|
|
7
7
|
export type CommandOptionWithType = CommandOption & {
|
|
8
8
|
type: ApplicationCommandOptionType;
|
|
9
9
|
};
|
package/lib/commands/handle.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HandleCommand = void 0;
|
|
4
|
-
const _1 = require(".");
|
|
5
4
|
const transformers_1 = require("../client/transformers");
|
|
6
5
|
const constants_1 = require("../common/it/constants");
|
|
7
6
|
const components_1 = require("../components");
|
|
8
7
|
const structures_1 = require("../structures");
|
|
9
8
|
const types_1 = require("../types");
|
|
9
|
+
const _1 = require(".");
|
|
10
10
|
class HandleCommand {
|
|
11
11
|
client;
|
|
12
12
|
constructor(client) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { EntryPointCommand } from '.';
|
|
2
1
|
import type { Logger, NulleableCoalising, OmitInsert } from '../common';
|
|
3
2
|
import { BaseHandler } from '../common';
|
|
4
3
|
import { type APIApplicationCommandOption, type LocalizationMap } from '../types';
|
|
4
|
+
import type { EntryPointCommand } from '.';
|
|
5
5
|
import { Command, type CommandOption, SubCommand } from './applications/chat';
|
|
6
6
|
import { ContextMenuCommand } from './applications/menu';
|
|
7
7
|
import { type UsingClient } from './applications/shared';
|
package/lib/commands/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from './applications/shared';
|
|
2
1
|
export * from './applications/chat';
|
|
3
2
|
export * from './applications/chatcontext';
|
|
3
|
+
export * from './applications/entrycontext';
|
|
4
|
+
export * from './applications/entryPoint';
|
|
4
5
|
export * from './applications/menu';
|
|
5
6
|
export * from './applications/menucontext';
|
|
6
7
|
export * from './applications/options';
|
|
7
|
-
export * from './applications/
|
|
8
|
-
export * from './applications/entrycontext';
|
|
8
|
+
export * from './applications/shared';
|
|
9
9
|
export * from './decorators';
|
|
10
10
|
export * from './optionresolver';
|
package/lib/commands/index.js
CHANGED
|
@@ -14,14 +14,14 @@ 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
|
-
__exportStar(require("./applications/shared"), exports);
|
|
18
17
|
//
|
|
19
18
|
__exportStar(require("./applications/chat"), exports);
|
|
20
19
|
__exportStar(require("./applications/chatcontext"), exports);
|
|
20
|
+
__exportStar(require("./applications/entrycontext"), exports);
|
|
21
|
+
__exportStar(require("./applications/entryPoint"), exports);
|
|
21
22
|
__exportStar(require("./applications/menu"), exports);
|
|
22
23
|
__exportStar(require("./applications/menucontext"), exports);
|
|
23
24
|
__exportStar(require("./applications/options"), exports);
|
|
24
|
-
__exportStar(require("./applications/
|
|
25
|
-
__exportStar(require("./applications/entrycontext"), exports);
|
|
25
|
+
__exportStar(require("./applications/shared"), exports);
|
|
26
26
|
__exportStar(require("./decorators"), exports);
|
|
27
27
|
__exportStar(require("./optionresolver"), exports);
|
package/lib/common/index.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './it/utils';
|
|
1
|
+
export * from './bot/watcher';
|
|
3
2
|
export * from './it/colors';
|
|
4
|
-
export
|
|
3
|
+
export * from './it/constants';
|
|
5
4
|
export * from './it/formatter';
|
|
6
|
-
export
|
|
5
|
+
export { AssignFilenameCallback, CustomizeLoggerCallback, Logger, LoggerOptions, LogLevels } from './it/logger';
|
|
6
|
+
export * from './it/utils';
|
|
7
|
+
export * from './shorters/application';
|
|
7
8
|
export * from './shorters/channels';
|
|
8
9
|
export * from './shorters/emojis';
|
|
9
10
|
export * from './shorters/guilds';
|
|
11
|
+
export * from './shorters/interaction';
|
|
12
|
+
export * from './shorters/invites';
|
|
10
13
|
export * from './shorters/members';
|
|
11
14
|
export * from './shorters/messages';
|
|
12
15
|
export * from './shorters/reactions';
|
|
13
16
|
export * from './shorters/roles';
|
|
14
17
|
export * from './shorters/templates';
|
|
15
|
-
export * from './shorters/users';
|
|
16
18
|
export * from './shorters/threads';
|
|
19
|
+
export * from './shorters/users';
|
|
17
20
|
export * from './shorters/webhook';
|
|
18
|
-
export * from './shorters/interaction';
|
|
19
|
-
export * from './shorters/application';
|
|
20
21
|
export * from './types/options';
|
|
21
22
|
export * from './types/resolvables';
|
|
22
23
|
export * from './types/util';
|
|
23
24
|
export * from './types/write';
|
|
24
|
-
export * from './bot/watcher';
|
package/lib/common/index.js
CHANGED
|
@@ -14,34 +14,34 @@ 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.
|
|
18
|
-
|
|
19
|
-
__exportStar(require("./
|
|
17
|
+
exports.LogLevels = exports.Logger = void 0;
|
|
18
|
+
//
|
|
19
|
+
__exportStar(require("./bot/watcher"), exports);
|
|
20
20
|
__exportStar(require("./it/colors"), exports);
|
|
21
|
+
__exportStar(require("./it/constants"), exports);
|
|
22
|
+
__exportStar(require("./it/formatter"), exports);
|
|
21
23
|
var logger_1 = require("./it/logger");
|
|
22
|
-
Object.defineProperty(exports, "LogLevels", { enumerable: true, get: function () { return logger_1.LogLevels; } });
|
|
23
24
|
Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return logger_1.Logger; } });
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
__exportStar(require("./shorters/
|
|
25
|
+
Object.defineProperty(exports, "LogLevels", { enumerable: true, get: function () { return logger_1.LogLevels; } });
|
|
26
|
+
__exportStar(require("./it/utils"), exports);
|
|
27
|
+
__exportStar(require("./shorters/application"), exports);
|
|
27
28
|
//
|
|
28
29
|
__exportStar(require("./shorters/channels"), exports);
|
|
29
30
|
__exportStar(require("./shorters/emojis"), exports);
|
|
30
31
|
__exportStar(require("./shorters/guilds"), exports);
|
|
32
|
+
__exportStar(require("./shorters/interaction"), exports);
|
|
33
|
+
// circular lol
|
|
34
|
+
__exportStar(require("./shorters/invites"), exports);
|
|
31
35
|
__exportStar(require("./shorters/members"), exports);
|
|
32
36
|
__exportStar(require("./shorters/messages"), exports);
|
|
33
37
|
__exportStar(require("./shorters/reactions"), exports);
|
|
34
38
|
__exportStar(require("./shorters/roles"), exports);
|
|
35
39
|
__exportStar(require("./shorters/templates"), exports);
|
|
36
|
-
__exportStar(require("./shorters/users"), exports);
|
|
37
40
|
__exportStar(require("./shorters/threads"), exports);
|
|
41
|
+
__exportStar(require("./shorters/users"), exports);
|
|
38
42
|
__exportStar(require("./shorters/webhook"), exports);
|
|
39
|
-
__exportStar(require("./shorters/interaction"), exports);
|
|
40
|
-
__exportStar(require("./shorters/application"), exports);
|
|
41
43
|
//
|
|
42
44
|
__exportStar(require("./types/options"), exports);
|
|
43
45
|
__exportStar(require("./types/resolvables"), exports);
|
|
44
46
|
__exportStar(require("./types/util"), exports);
|
|
45
47
|
__exportStar(require("./types/write"), exports);
|
|
46
|
-
//
|
|
47
|
-
__exportStar(require("./bot/watcher"), exports);
|
package/lib/common/it/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ColorResolvable, type EmojiResolvable, type Logger, type ObjectToLower, type ObjectToSnake, type TypeArray } from '..';
|
|
2
1
|
import type { Cache } from '../../cache';
|
|
3
2
|
import { type APIPartialEmoji, GatewayIntentBits } from '../../types';
|
|
3
|
+
import { type ColorResolvable, type EmojiResolvable, type Logger, type ObjectToLower, type ObjectToSnake, type TypeArray } from '..';
|
|
4
4
|
/**
|
|
5
5
|
* Calculates the shard ID for a guild based on its ID.
|
|
6
6
|
* @param guildId The ID of the guild.
|
package/lib/common/it/utils.js
CHANGED
|
@@ -24,8 +24,8 @@ exports.toBuffer = toBuffer;
|
|
|
24
24
|
exports.assertString = assertString;
|
|
25
25
|
const node_fs_1 = require("node:fs");
|
|
26
26
|
const node_path_1 = require("node:path");
|
|
27
|
-
const __1 = require("..");
|
|
28
27
|
const types_1 = require("../../types");
|
|
28
|
+
const __1 = require("..");
|
|
29
29
|
/**
|
|
30
30
|
* Calculates the shard ID for a guild based on its ID.
|
|
31
31
|
* @param guildId The ID of the guild.
|
|
@@ -282,8 +282,6 @@ function lazyLoadPackage(mod) {
|
|
|
282
282
|
return require(mod);
|
|
283
283
|
}
|
|
284
284
|
catch (e) {
|
|
285
|
-
// biome-ignore lint/suspicious/noConsoleLog:
|
|
286
|
-
// biome-ignore lint/suspicious/noConsole:
|
|
287
285
|
console.log(`Cannot import ${mod}`, e);
|
|
288
286
|
return;
|
|
289
287
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { RESTGetAPIChannelMessagesQuery, RESTPostAPIChannelMessagesThreadsJSONBody } from '../../types';
|
|
2
1
|
import type { ValidAnswerId } from '../../api/Routes/channels';
|
|
3
2
|
import { type MessageStructure, type ThreadChannelStructure, type UserStructure } from '../../client';
|
|
3
|
+
import type { RESTGetAPIChannelMessagesQuery, RESTPostAPIChannelMessagesThreadsJSONBody } from '../../types';
|
|
4
4
|
import type { MessageCreateBodyRequest, MessageUpdateBodyRequest } from '../types/write';
|
|
5
5
|
import { BaseShorter } from './base';
|
|
6
6
|
export declare class MessageShorter extends BaseShorter {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MessageShorter = void 0;
|
|
4
4
|
const builders_1 = require("../../builders");
|
|
5
|
-
const structures_1 = require("../../structures");
|
|
6
5
|
const cache_1 = require("../../cache");
|
|
7
6
|
const client_1 = require("../../client");
|
|
7
|
+
const structures_1 = require("../../structures");
|
|
8
8
|
const base_1 = require("./base");
|
|
9
9
|
class MessageShorter extends base_1.BaseShorter {
|
|
10
10
|
async write(channelId, { files, ...body }) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ThreadChannelStructure } from '../../client/transformers';
|
|
2
|
-
import type
|
|
2
|
+
import { type APIThreadMember, type RESTGetAPIChannelThreadMembersQuery, type RESTGetAPIChannelThreadsArchivedQuery, type RESTPatchAPIChannelJSONBody, type RESTPostAPIChannelMessagesThreadsJSONBody, type RESTPostAPIChannelThreadsJSONBody, type RESTPostAPIGuildForumThreadsJSONBody } from '../../types';
|
|
3
3
|
import type { MakeRequired, When } from '../types/util';
|
|
4
4
|
import { BaseShorter } from './base';
|
|
5
5
|
export declare class ThreadShorter extends BaseShorter {
|
|
@@ -21,11 +21,12 @@ export declare class ThreadShorter extends BaseShorter {
|
|
|
21
21
|
fetchMember<WithMember extends boolean = false>(threadId: string, memberId: string, with_member: WithMember): Promise<When<WithMember, Required<APIThreadMember>, GetAPIChannelThreadMemberResult>>;
|
|
22
22
|
addMember(threadId: string, memberId: string): Promise<undefined>;
|
|
23
23
|
listMembers<T extends RESTGetAPIChannelThreadMembersQuery = RESTGetAPIChannelThreadMembersQuery>(threadId: string, query?: T): Promise<InferWithMemberOnList<T>>;
|
|
24
|
-
|
|
24
|
+
listArchived(channelId: string, type: 'public' | 'private', query?: RESTGetAPIChannelThreadsArchivedQuery): Promise<{
|
|
25
25
|
threads: ThreadChannelStructure[];
|
|
26
26
|
members: GetAPIChannelThreadMemberResult[];
|
|
27
27
|
hasMore: boolean;
|
|
28
28
|
}>;
|
|
29
|
+
listGuildActive(guildId: string, force?: boolean): Promise<ThreadChannelStructure[]>;
|
|
29
30
|
listJoinedArchivedPrivate(channelId: string, query?: RESTGetAPIChannelThreadsArchivedQuery): Promise<{
|
|
30
31
|
threads: ThreadChannelStructure[];
|
|
31
32
|
members: GetAPIChannelThreadMemberResult[];
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ThreadShorter = void 0;
|
|
4
4
|
const __1 = require("../..");
|
|
5
5
|
const structures_1 = require("../../structures");
|
|
6
|
+
const types_1 = require("../../types");
|
|
6
7
|
const base_1 = require("./base");
|
|
7
8
|
class ThreadShorter extends base_1.BaseShorter {
|
|
8
9
|
/**
|
|
@@ -21,16 +22,11 @@ class ThreadShorter extends base_1.BaseShorter {
|
|
|
21
22
|
return (0, structures_1.channelFrom)(thread, this.client);
|
|
22
23
|
}));
|
|
23
24
|
}
|
|
24
|
-
fromMessage(channelId, messageId, options) {
|
|
25
|
+
async fromMessage(channelId, messageId, options) {
|
|
25
26
|
const { reason, ...body } = options;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
.threads.post({ body, reason })
|
|
30
|
-
.then(async (thread) => {
|
|
31
|
-
await this.client.cache.channels?.setIfNI(__1.CacheFrom.Rest, 'Guilds', thread.id, thread.guild_id, thread);
|
|
32
|
-
return (0, structures_1.channelFrom)(thread, this.client);
|
|
33
|
-
});
|
|
27
|
+
const thread = await this.client.proxy.channels(channelId).messages(messageId).threads.post({ body, reason });
|
|
28
|
+
await this.client.cache.channels?.setIfNI(__1.CacheFrom.Rest, 'Guilds', thread.id, thread.guild_id, thread);
|
|
29
|
+
return await (0, structures_1.channelFrom)(thread, this.client);
|
|
34
30
|
}
|
|
35
31
|
join(threadId) {
|
|
36
32
|
return this.client.proxy.channels(threadId)['thread-members']('@me').put();
|
|
@@ -38,8 +34,9 @@ class ThreadShorter extends base_1.BaseShorter {
|
|
|
38
34
|
leave(threadId) {
|
|
39
35
|
return this.client.proxy.channels(threadId)['thread-members']('@me').delete();
|
|
40
36
|
}
|
|
41
|
-
lock(threadId, locked = true, reason) {
|
|
42
|
-
|
|
37
|
+
async lock(threadId, locked = true, reason) {
|
|
38
|
+
const x = await this.edit(threadId, { locked }, reason);
|
|
39
|
+
return (0, structures_1.channelFrom)(x, this.client);
|
|
43
40
|
}
|
|
44
41
|
async edit(threadId, body, reason) {
|
|
45
42
|
return (await this.client.channels.edit(threadId, body, { reason }));
|
|
@@ -60,7 +57,7 @@ class ThreadShorter extends base_1.BaseShorter {
|
|
|
60
57
|
listMembers(threadId, query) {
|
|
61
58
|
return this.client.proxy.channels(threadId)['thread-members'].get({ query });
|
|
62
59
|
}
|
|
63
|
-
async
|
|
60
|
+
async listArchived(channelId, type, query) {
|
|
64
61
|
const data = await this.client.proxy.channels(channelId).threads.archived[type].get({ query });
|
|
65
62
|
return {
|
|
66
63
|
threads: data.threads.map(thread => (0, structures_1.channelFrom)(thread, this.client)),
|
|
@@ -68,6 +65,20 @@ class ThreadShorter extends base_1.BaseShorter {
|
|
|
68
65
|
hasMore: data.has_more,
|
|
69
66
|
};
|
|
70
67
|
}
|
|
68
|
+
async listGuildActive(guildId, force = false) {
|
|
69
|
+
if (!force) {
|
|
70
|
+
const cached = await this.client.cache.channels?.valuesRaw(guildId);
|
|
71
|
+
if (cached)
|
|
72
|
+
return cached
|
|
73
|
+
.filter(x => [types_1.ChannelType.PublicThread, types_1.ChannelType.PrivateThread, types_1.ChannelType.AnnouncementThread].includes(x.type))
|
|
74
|
+
.map(x => (0, structures_1.channelFrom)(x, this.client));
|
|
75
|
+
}
|
|
76
|
+
const data = await this.client.proxy.guilds(guildId).threads.active.get();
|
|
77
|
+
return Promise.all(data.threads.map(async (thread) => {
|
|
78
|
+
await this.client.cache.channels?.setIfNI(__1.CacheFrom.Rest, 'Guilds', thread.id, guildId, thread);
|
|
79
|
+
return (0, structures_1.channelFrom)(thread, this.client);
|
|
80
|
+
}));
|
|
81
|
+
}
|
|
71
82
|
async listJoinedArchivedPrivate(channelId, query) {
|
|
72
83
|
const data = await this.client.proxy.channels(channelId).users('@me').threads.archived.private.get({ query });
|
|
73
84
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Identify } from '..';
|
|
2
1
|
import type { CDNUrlOptions } from '../../api';
|
|
3
2
|
import type { UsingClient } from '../../commands';
|
|
3
|
+
import type { Identify } from '..';
|
|
4
4
|
export type ImageOptions = CDNUrlOptions;
|
|
5
5
|
export type MethodContext<T = object> = Identify<{
|
|
6
6
|
client: UsingClient;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { EmbedColors, OmitInsert } from '..';
|
|
2
1
|
import type { Attachment, AttachmentDataType, AttachmentResolvable } from '../../builders';
|
|
3
2
|
import type { GuildMember } from '../../structures';
|
|
4
3
|
import type { APIGuildMember, APIPartialEmoji, RESTPostAPIApplicationEmojiJSONBody } from '../../types';
|
|
4
|
+
import type { EmbedColors, OmitInsert } from '..';
|
|
5
5
|
export type EmojiResolvable = string | Partial<APIPartialEmoji> | `<${string | undefined}:${string}:${string}>`;
|
|
6
6
|
export type GuildMemberResolvable = string | Partial<GuildMember> | APIGuildMember;
|
|
7
7
|
export type ColorResolvable = `#${string}` | number | keyof typeof EmbedColors | 'Random' | [number, number, number];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ContainerComponents } from '.';
|
|
2
1
|
import type { APIContainerComponent, ComponentType } from '../types';
|
|
2
|
+
import { type ContainerComponents } from '.';
|
|
3
3
|
import { BaseComponent } from './BaseComponent';
|
|
4
4
|
export declare class ContainerComponent extends BaseComponent<ComponentType.Container> {
|
|
5
5
|
_components: ContainerComponents[];
|