mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 20:46:08 +00:00
chore: organize imports
This commit is contained in:
parent
eb19b72c0d
commit
a355d843ad
@ -1,20 +1,32 @@
|
||||
import type {
|
||||
RESTDeleteAPIApplicationEmojiResult,
|
||||
RESTGetAPIApplicationCommandResult,
|
||||
RESTGetAPIApplicationCommandsQuery,
|
||||
RESTGetAPIApplicationCommandsResult,
|
||||
RESTGetAPIApplicationEmojiResult,
|
||||
RESTGetAPIApplicationEmojisResult,
|
||||
RESTGetAPIApplicationGuildCommandResult,
|
||||
RESTGetAPIApplicationGuildCommandsQuery,
|
||||
RESTGetAPIApplicationGuildCommandsResult,
|
||||
RESTGetAPIApplicationRoleConnectionMetadataResult,
|
||||
RESTGetAPIEntitlementsQuery,
|
||||
RESTGetAPIEntitlementsResult,
|
||||
RESTGetAPIGuildApplicationCommandsPermissionsResult,
|
||||
RESTGetAPISKUsResult,
|
||||
RESTPatchAPIApplicationCommandJSONBody,
|
||||
RESTPatchAPIApplicationCommandResult,
|
||||
RESTPatchAPIApplicationEmojiJSONBody,
|
||||
RESTPatchAPIApplicationEmojiResult,
|
||||
RESTPatchAPIApplicationGuildCommandJSONBody,
|
||||
RESTPatchAPIApplicationGuildCommandResult,
|
||||
RESTPostAPIApplicationCommandsJSONBody,
|
||||
RESTPostAPIApplicationCommandsResult,
|
||||
RESTPostAPIApplicationEmojiJSONBody,
|
||||
RESTPostAPIApplicationEmojiResult,
|
||||
RESTPostAPIApplicationGuildCommandsJSONBody,
|
||||
RESTPostAPIApplicationGuildCommandsResult,
|
||||
RESTPostAPIEntitlementBody,
|
||||
RESTPostAPIEntitlementResult,
|
||||
RESTPutAPIApplicationCommandPermissionsJSONBody,
|
||||
RESTPutAPIApplicationCommandsJSONBody,
|
||||
RESTPutAPIApplicationCommandsResult,
|
||||
@ -23,18 +35,6 @@ import type {
|
||||
RESTPutAPIApplicationRoleConnectionMetadataJSONBody,
|
||||
RESTPutAPIApplicationRoleConnectionMetadataResult,
|
||||
RESTPutAPIGuildApplicationCommandsPermissionsResult,
|
||||
RESTGetAPIApplicationEmojiResult,
|
||||
RESTGetAPIApplicationEmojisResult,
|
||||
RESTPostAPIApplicationEmojiJSONBody,
|
||||
RESTPatchAPIApplicationEmojiJSONBody,
|
||||
RESTPostAPIApplicationEmojiResult,
|
||||
RESTPatchAPIApplicationEmojiResult,
|
||||
RESTDeleteAPIApplicationEmojiResult,
|
||||
RESTGetAPIEntitlementsResult,
|
||||
RESTGetAPIEntitlementsQuery,
|
||||
RESTPostAPIEntitlementBody,
|
||||
RESTPostAPIEntitlementResult,
|
||||
RESTGetAPISKUsResult,
|
||||
} from '../../types';
|
||||
|
||||
import type { ProxyRequestMethod } from '../Router';
|
||||
|
@ -1,10 +1,10 @@
|
||||
import type {
|
||||
RESTGetAPISKUSubscriptionsResult,
|
||||
RESTGetAPISKUSubscriptionsQuery,
|
||||
RESTGetAPISKUSubscriptionResult,
|
||||
RESTGetAPISKUSubscriptionsQuery,
|
||||
RESTGetAPISKUSubscriptionsResult,
|
||||
} from '../../types';
|
||||
import type { RestArguments } from '../api';
|
||||
import type { ProxyRequestMethod } from '../Router';
|
||||
import type { RestArguments } from '../api';
|
||||
|
||||
export interface SKuRoutes {
|
||||
skus(id: string): {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import type { RestOrArray } from '../common/types/util';
|
||||
import {
|
||||
ComponentType,
|
||||
type APIActionRowComponent,
|
||||
type APIActionRowComponentTypes,
|
||||
type APIMessageActionRowComponent,
|
||||
ComponentType,
|
||||
} from '../types';
|
||||
import type { RestOrArray } from '../common/types/util';
|
||||
import { BaseComponentBuilder } from './Base';
|
||||
import { fromComponent } from './index';
|
||||
import type { BuilderComponents, FixedComponents } from './types';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { type APIMessageComponentEmoji, type ButtonStyle, ComponentType, type APIButtonComponent } from '../types';
|
||||
import { resolvePartialEmoji, type EmojiResolvable } from '../common';
|
||||
import { type EmojiResolvable, resolvePartialEmoji } from '../common';
|
||||
import { type APIButtonComponent, type APIMessageComponentEmoji, type ButtonStyle, ComponentType } from '../types';
|
||||
|
||||
/**
|
||||
* Represents a button component.
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { type ColorResolvable, type ObjectToLower, type RestOrArray, resolveColor, toSnakeCase } from '../common';
|
||||
import type { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter } from '../types';
|
||||
import { resolveColor, toSnakeCase, type ColorResolvable, type ObjectToLower, type RestOrArray } from '../common';
|
||||
|
||||
/**
|
||||
* Represents a message embed.
|
||||
|
@ -1,3 +1,4 @@
|
||||
import type { RestOrArray } from '../common';
|
||||
import {
|
||||
type APIActionRowComponent,
|
||||
type APIModalInteractionResponseCallbackData,
|
||||
@ -5,7 +6,6 @@ import {
|
||||
ComponentType,
|
||||
type TextInputStyle,
|
||||
} from '../types';
|
||||
import type { RestOrArray } from '../common';
|
||||
import type { ActionRow } from './ActionRow';
|
||||
import { BaseComponentBuilder, type OptionValuesLength } from './Base';
|
||||
import { fromComponent } from './index';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { type DeepPartial, type EmojiResolvable, type RestOrArray, resolvePartialEmoji } from '../common';
|
||||
import { type APIPollMedia, PollLayoutType, type RESTAPIPollCreate } from '../types';
|
||||
import { resolvePartialEmoji, type DeepPartial, type EmojiResolvable, type RestOrArray } from '../common';
|
||||
|
||||
export class PollBuilder {
|
||||
constructor(public data: DeepPartial<RESTAPIPollCreate> = {}) {
|
||||
|
@ -1,3 +1,13 @@
|
||||
import type { EmojiResolvable, RestOrArray, ToClass } from '../common';
|
||||
import { resolvePartialEmoji } from '../common/it/utils';
|
||||
import type {
|
||||
ChannelSelectMenuInteraction,
|
||||
ComponentInteraction,
|
||||
MentionableSelectMenuInteraction,
|
||||
RoleSelectMenuInteraction,
|
||||
StringSelectMenuInteraction,
|
||||
UserSelectMenuInteraction,
|
||||
} from '../structures';
|
||||
import {
|
||||
type APIChannelSelectComponent,
|
||||
type APIMentionableSelectComponent,
|
||||
@ -12,16 +22,6 @@ import {
|
||||
ComponentType,
|
||||
SelectMenuDefaultValueType,
|
||||
} from '../types';
|
||||
import type { EmojiResolvable, RestOrArray, ToClass } from '../common';
|
||||
import type {
|
||||
ChannelSelectMenuInteraction,
|
||||
ComponentInteraction,
|
||||
MentionableSelectMenuInteraction,
|
||||
RoleSelectMenuInteraction,
|
||||
StringSelectMenuInteraction,
|
||||
UserSelectMenuInteraction,
|
||||
} from '../structures';
|
||||
import { resolvePartialEmoji } from '../common/it/utils';
|
||||
import { BaseComponentBuilder, type OptionValuesLength } from './Base';
|
||||
|
||||
export type BuilderSelectMenus =
|
||||
|
6
src/cache/resources/bans.ts
vendored
6
src/cache/resources/bans.ts
vendored
@ -1,8 +1,8 @@
|
||||
import type { APIBan, GatewayGuildBanModifyDispatchData } from '../../types';
|
||||
import type { ReturnCache } from '../..';
|
||||
import { fakePromise } from '../../common';
|
||||
import { GuildBasedResource } from './default/guild-based';
|
||||
import { type GuildBanStructure, Transformers } from '../../client/transformers';
|
||||
import { fakePromise } from '../../common';
|
||||
import type { APIBan, GatewayGuildBanModifyDispatchData } from '../../types';
|
||||
import { GuildBasedResource } from './default/guild-based';
|
||||
export class Bans extends GuildBasedResource<any, GatewayGuildBanModifyDispatchData | APIBan> {
|
||||
namespace = 'ban';
|
||||
|
||||
|
4
src/cache/resources/channels.ts
vendored
4
src/cache/resources/channels.ts
vendored
@ -1,6 +1,6 @@
|
||||
import type { APIChannel } from '../../types';
|
||||
import { fakePromise } from '../../common';
|
||||
import { channelFrom, type AllChannels } from '../../structures';
|
||||
import { type AllChannels, channelFrom } from '../../structures';
|
||||
import type { APIChannel } from '../../types';
|
||||
import type { ReturnCache } from '../index';
|
||||
import { GuildRelatedResource } from './default/guild-related';
|
||||
|
||||
|
6
src/cache/resources/emojis.ts
vendored
6
src/cache/resources/emojis.ts
vendored
@ -1,8 +1,8 @@
|
||||
import type { APIEmoji } from '../../types';
|
||||
import type { ReturnCache } from '../..';
|
||||
import { fakePromise } from '../../common';
|
||||
import { GuildRelatedResource } from './default/guild-related';
|
||||
import { type GuildEmojiStructure, Transformers } from '../../client/transformers';
|
||||
import { fakePromise } from '../../common';
|
||||
import type { APIEmoji } from '../../types';
|
||||
import { GuildRelatedResource } from './default/guild-related';
|
||||
|
||||
export class Emojis extends GuildRelatedResource<any, APIEmoji> {
|
||||
namespace = 'emoji';
|
||||
|
6
src/cache/resources/guilds.ts
vendored
6
src/cache/resources/guilds.ts
vendored
@ -1,8 +1,8 @@
|
||||
import type { APIGuild, GatewayGuildCreateDispatchData } from '../../types';
|
||||
import type { Cache, ReturnCache } from '..';
|
||||
import { fakePromise } from '../../common';
|
||||
import { BaseResource } from './default/base';
|
||||
import { type GuildStructure, Transformers } from '../../client/transformers';
|
||||
import { fakePromise } from '../../common';
|
||||
import type { APIGuild, GatewayGuildCreateDispatchData } from '../../types';
|
||||
import { BaseResource } from './default/base';
|
||||
|
||||
export class Guilds extends BaseResource<any, APIGuild | GatewayGuildCreateDispatchData> {
|
||||
namespace = 'guild';
|
||||
|
6
src/cache/resources/members.ts
vendored
6
src/cache/resources/members.ts
vendored
@ -1,8 +1,8 @@
|
||||
import type { APIGuildMember } from '../../types';
|
||||
import type { ReturnCache } from '../..';
|
||||
import { fakePromise } from '../../common';
|
||||
import { GuildBasedResource } from './default/guild-based';
|
||||
import { type GuildMemberStructure, Transformers } from '../../client/transformers';
|
||||
import { fakePromise } from '../../common';
|
||||
import type { APIGuildMember } from '../../types';
|
||||
import { GuildBasedResource } from './default/guild-based';
|
||||
export class Members extends GuildBasedResource<any, APIGuildMember> {
|
||||
namespace = 'member';
|
||||
|
||||
|
6
src/cache/resources/messages.ts
vendored
6
src/cache/resources/messages.ts
vendored
@ -1,8 +1,8 @@
|
||||
import type { MessageData, ReturnCache } from '../..';
|
||||
import { type MessageStructure, Transformers } from '../../client/transformers';
|
||||
import { fakePromise } from '../../common';
|
||||
import type { APIMessage, APIUser } from '../../types';
|
||||
import { GuildRelatedResource } from './default/guild-related';
|
||||
import type { MessageData, ReturnCache } from '../..';
|
||||
import { fakePromise } from '../../common';
|
||||
import { type MessageStructure, Transformers } from '../../client/transformers';
|
||||
|
||||
export class Messages extends GuildRelatedResource<any, APIMessage> {
|
||||
namespace = 'message';
|
||||
|
2
src/cache/resources/overwrites.ts
vendored
2
src/cache/resources/overwrites.ts
vendored
@ -1,7 +1,7 @@
|
||||
import type { APIOverwrite } from '../../types';
|
||||
import type { ReturnCache } from '../..';
|
||||
import { fakePromise } from '../../common/it/utils';
|
||||
import { PermissionsBitField } from '../../structures/extra/Permissions';
|
||||
import type { APIOverwrite } from '../../types';
|
||||
import { GuildRelatedResource } from './default/guild-related';
|
||||
|
||||
export class Overwrites extends GuildRelatedResource<any, APIOverwrite[]> {
|
||||
|
6
src/cache/resources/roles.ts
vendored
6
src/cache/resources/roles.ts
vendored
@ -1,8 +1,8 @@
|
||||
import type { APIRole } from '../../types';
|
||||
import type { ReturnCache } from '../..';
|
||||
import { fakePromise } from '../../common';
|
||||
import { GuildRelatedResource } from './default/guild-related';
|
||||
import { type GuildRoleStructure, Transformers } from '../../client/transformers';
|
||||
import { fakePromise } from '../../common';
|
||||
import type { APIRole } from '../../types';
|
||||
import { GuildRelatedResource } from './default/guild-related';
|
||||
|
||||
export class Roles extends GuildRelatedResource<any, APIRole> {
|
||||
namespace = 'role';
|
||||
|
6
src/cache/resources/stickers.ts
vendored
6
src/cache/resources/stickers.ts
vendored
@ -1,8 +1,8 @@
|
||||
import type { APISticker } from '../../types';
|
||||
import type { ReturnCache } from '../..';
|
||||
import { fakePromise } from '../../common';
|
||||
import { GuildRelatedResource } from './default/guild-related';
|
||||
import { type StickerStructure, Transformers } from '../../client/transformers';
|
||||
import { fakePromise } from '../../common';
|
||||
import type { APISticker } from '../../types';
|
||||
import { GuildRelatedResource } from './default/guild-related';
|
||||
|
||||
export class Stickers extends GuildRelatedResource<any, APISticker> {
|
||||
namespace = 'sticker';
|
||||
|
6
src/cache/resources/threads.ts
vendored
6
src/cache/resources/threads.ts
vendored
@ -1,8 +1,8 @@
|
||||
import type { APIThreadChannel } from '../../types';
|
||||
import type { ReturnCache } from '../..';
|
||||
import { fakePromise } from '../../common';
|
||||
import { GuildRelatedResource } from './default/guild-related';
|
||||
import { type ThreadChannelStructure, Transformers } from '../../client/transformers';
|
||||
import { fakePromise } from '../../common';
|
||||
import type { APIThreadChannel } from '../../types';
|
||||
import { GuildRelatedResource } from './default/guild-related';
|
||||
|
||||
export class Threads extends GuildRelatedResource<any, APIThreadChannel> {
|
||||
namespace = 'thread';
|
||||
|
6
src/cache/resources/users.ts
vendored
6
src/cache/resources/users.ts
vendored
@ -1,8 +1,8 @@
|
||||
import type { APIUser } from '../../types';
|
||||
import type { ReturnCache } from '../..';
|
||||
import { fakePromise } from '../../common';
|
||||
import { BaseResource } from './default/base';
|
||||
import { Transformers, type UserStructure } from '../../client/transformers';
|
||||
import { fakePromise } from '../../common';
|
||||
import type { APIUser } from '../../types';
|
||||
import { BaseResource } from './default/base';
|
||||
|
||||
export class Users extends BaseResource<any, APIUser> {
|
||||
namespace = 'user';
|
||||
|
6
src/cache/resources/voice-states.ts
vendored
6
src/cache/resources/voice-states.ts
vendored
@ -1,8 +1,8 @@
|
||||
import type { APIVoiceState } from '../../types';
|
||||
import type { ReturnCache } from '../..';
|
||||
import { fakePromise } from '../../common';
|
||||
import { GuildBasedResource } from './default/guild-based';
|
||||
import { Transformers, type VoiceStateStructure } from '../../client/transformers';
|
||||
import { fakePromise } from '../../common';
|
||||
import type { APIVoiceState } from '../../types';
|
||||
import { GuildBasedResource } from './default/guild-based';
|
||||
|
||||
export class VoiceStates extends GuildBasedResource<any, APIVoiceState> {
|
||||
namespace = 'voice_state';
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { error } from 'node:console';
|
||||
import { randomUUID } from 'node:crypto';
|
||||
import type { UsingClient } from '../commands';
|
||||
import type { Awaitable, CamelCase } from '../common';
|
||||
import type { CallbackEventHandler, CustomEventsKeys, GatewayEvents } from '../events';
|
||||
import { error } from 'node:console';
|
||||
import * as RawEvents from '../events/hooks';
|
||||
import type { UsingClient } from '../commands';
|
||||
|
||||
export type AllClientEvents = CustomEventsKeys | GatewayEvents;
|
||||
export type ParseClientEventName<T extends AllClientEvents> = T extends CustomEventsKeys ? T : CamelCase<T>;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { APIInteractionResponse, APIInteraction } from '../types';
|
||||
import { isBufferLike } from '../api/utils/utils';
|
||||
import type { DeepPartial } from '../common';
|
||||
import type { APIInteraction, APIInteractionResponse } from '../types';
|
||||
import type { BaseClientOptions, StartOptions } from './base';
|
||||
import { BaseClient } from './base';
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { magicImport, type PermissionStrings } from '../../common';
|
||||
import { type PermissionStrings, magicImport } from '../../common';
|
||||
import {
|
||||
ApplicationCommandType,
|
||||
type EntryPointCommandHandlerType,
|
||||
type ApplicationIntegrationType,
|
||||
type EntryPointCommandHandlerType,
|
||||
type InteractionContextType,
|
||||
type LocaleString,
|
||||
} from '../../types';
|
||||
|
@ -1,5 +1,10 @@
|
||||
import { MessageFlags } from '../../types';
|
||||
import type { ReturnCache } from '../..';
|
||||
import type {
|
||||
GuildMemberStructure,
|
||||
GuildStructure,
|
||||
MessageStructure,
|
||||
WebhookMessageStructure,
|
||||
} from '../../client/transformers';
|
||||
import type {
|
||||
InteractionCreateBodyRequest,
|
||||
InteractionMessageUpdateBodyRequest,
|
||||
@ -8,16 +13,11 @@ import type {
|
||||
When,
|
||||
} from '../../common';
|
||||
import type { AllChannels, EntryPointInteraction } from '../../structures';
|
||||
import { MessageFlags } from '../../types';
|
||||
import { BaseContext } from '../basecontext';
|
||||
import type { RegisteredMiddlewares } from '../decorators';
|
||||
import type { CommandMetadata, ExtendContext, GlobalMetadata, UsingClient } from './shared';
|
||||
import type {
|
||||
GuildMemberStructure,
|
||||
GuildStructure,
|
||||
MessageStructure,
|
||||
WebhookMessageStructure,
|
||||
} from '../../client/transformers';
|
||||
import type { EntryPointCommand } from './entryPoint';
|
||||
import type { CommandMetadata, ExtendContext, GlobalMetadata, UsingClient } from './shared';
|
||||
|
||||
export interface EntryPointContext<M extends keyof RegisteredMiddlewares = never> extends BaseContext, ExtendContext {}
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { type PermissionStrings, magicImport } from '../../common';
|
||||
import type {
|
||||
ApplicationCommandType,
|
||||
ApplicationIntegrationType,
|
||||
InteractionContextType,
|
||||
LocaleString,
|
||||
} from '../../types';
|
||||
import { magicImport, type PermissionStrings } from '../../common';
|
||||
import type { RegisteredMiddlewares } from '../decorators';
|
||||
import type { MenuCommandContext } from './menucontext';
|
||||
import type { ExtraProps, UsingClient } from './shared';
|
||||
|
@ -1,17 +1,4 @@
|
||||
import { type APIMessage, ApplicationCommandType, MessageFlags } from '../../types';
|
||||
import type { ContextMenuCommand, ReturnCache } from '../..';
|
||||
import {
|
||||
toSnakeCase,
|
||||
type InteractionCreateBodyRequest,
|
||||
type InteractionMessageUpdateBodyRequest,
|
||||
type ModalCreateBodyRequest,
|
||||
type UnionToTuple,
|
||||
type When,
|
||||
} from '../../common';
|
||||
import type { AllChannels, MessageCommandInteraction, UserCommandInteraction } from '../../structures';
|
||||
import { BaseContext } from '../basecontext';
|
||||
import type { RegisteredMiddlewares } from '../decorators';
|
||||
import type { CommandMetadata, ExtendContext, GlobalMetadata, UsingClient } from './shared';
|
||||
import {
|
||||
type GuildMemberStructure,
|
||||
type GuildStructure,
|
||||
@ -20,6 +7,19 @@ import {
|
||||
type UserStructure,
|
||||
type WebhookMessageStructure,
|
||||
} from '../../client/transformers';
|
||||
import {
|
||||
type InteractionCreateBodyRequest,
|
||||
type InteractionMessageUpdateBodyRequest,
|
||||
type ModalCreateBodyRequest,
|
||||
type UnionToTuple,
|
||||
type When,
|
||||
toSnakeCase,
|
||||
} from '../../common';
|
||||
import type { AllChannels, MessageCommandInteraction, UserCommandInteraction } from '../../structures';
|
||||
import { type APIMessage, ApplicationCommandType, MessageFlags } from '../../types';
|
||||
import { BaseContext } from '../basecontext';
|
||||
import type { RegisteredMiddlewares } from '../decorators';
|
||||
import type { CommandMetadata, ExtendContext, GlobalMetadata, UsingClient } from './shared';
|
||||
|
||||
export type InteractionTarget<T> = T extends MessageCommandInteraction ? MessageStructure : UserStructure;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import type { ModalContext } from '../components';
|
||||
import type { ContextComponentCommandInteractionMap, ComponentContext } from '../components/componentcontext';
|
||||
import type { ComponentContext, ContextComponentCommandInteractionMap } from '../components/componentcontext';
|
||||
import type { MessageCommandInteraction, UserCommandInteraction } from '../structures';
|
||||
import type { CommandContext } from './applications/chatcontext';
|
||||
import type { MenuCommandContext } from './applications/menucontext';
|
||||
|
@ -1,3 +1,13 @@
|
||||
import { Attachment } from '../builders';
|
||||
import {
|
||||
type GuildMemberStructure,
|
||||
type GuildRoleStructure,
|
||||
type InteractionGuildMemberStructure,
|
||||
Transformers,
|
||||
type UserStructure,
|
||||
} from '../client/transformers';
|
||||
import type { MakeRequired } from '../common';
|
||||
import { type AllChannels, channelFrom } from '../structures';
|
||||
import {
|
||||
type APIApplicationCommandInteractionDataOption,
|
||||
type APIAttachment,
|
||||
@ -8,18 +18,8 @@ import {
|
||||
type APIUser,
|
||||
ApplicationCommandOptionType,
|
||||
} from '../types';
|
||||
import type { MakeRequired } from '../common';
|
||||
import { channelFrom, type AllChannels } from '../structures';
|
||||
import type { Command, CommandAutocompleteOption, CommandOption, SubCommand } from './applications/chat';
|
||||
import type { UsingClient } from './applications/shared';
|
||||
import {
|
||||
type GuildMemberStructure,
|
||||
type GuildRoleStructure,
|
||||
type InteractionGuildMemberStructure,
|
||||
Transformers,
|
||||
type UserStructure,
|
||||
} from '../client/transformers';
|
||||
import { Attachment } from '../builders';
|
||||
|
||||
export type ContextOptionsResolved = {
|
||||
members?: Record<string, APIGuildMember | Omit<APIGuildMember, 'user'> | APIInteractionGuildMember>;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { BaseInteraction, resolveFiles, type ReplyInteractionBody, Modal } from '../..';
|
||||
import { BaseInteraction, Modal, type ReplyInteractionBody, resolveFiles } from '../..';
|
||||
import { Transformers } from '../../client/transformers';
|
||||
import type { InteractionMessageUpdateBodyRequest, MessageWebhookCreateBodyRequest } from '../types/write';
|
||||
import { BaseShorter } from './base';
|
||||
|
@ -1,15 +1,15 @@
|
||||
import { resolveFiles } from '../../builders';
|
||||
import { MessagesMethods } from '../../structures';
|
||||
import type {
|
||||
RESTPatchAPIChannelMessageJSONBody,
|
||||
RESTPostAPIChannelMessageJSONBody,
|
||||
RESTPostAPIChannelMessagesThreadsJSONBody,
|
||||
} from '../../types';
|
||||
import { resolveFiles } from '../../builders';
|
||||
import { MessagesMethods } from '../../structures';
|
||||
|
||||
import type { MessageCreateBodyRequest, MessageUpdateBodyRequest } from '../types/write';
|
||||
import { BaseShorter } from './base';
|
||||
import type { ValidAnswerId } from '../../api/Routes/channels';
|
||||
import { Transformers } from '../../client/transformers';
|
||||
import type { MessageCreateBodyRequest, MessageUpdateBodyRequest } from '../types/write';
|
||||
import { BaseShorter } from './base';
|
||||
|
||||
export class MessageShorter extends BaseShorter {
|
||||
async write(channelId: string, { files, ...body }: MessageCreateBodyRequest) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import type { RESTGetAPIChannelMessageReactionUsersQuery } from '../../types';
|
||||
import { Transformers, type UserStructure } from '../../client/transformers';
|
||||
import { encodeEmoji, resolveEmoji } from '../../common/it/utils';
|
||||
import type { RESTGetAPIChannelMessageReactionUsersQuery } from '../../types';
|
||||
import type { EmojiResolvable } from '../types/resolvables';
|
||||
import { BaseShorter } from './base';
|
||||
import { Transformers, type UserStructure } from '../../client/transformers';
|
||||
|
||||
export class ReactionShorter extends BaseShorter {
|
||||
async add(messageId: string, channelId: string, emoji: EmojiResolvable): Promise<void> {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { Transformers } from '../../client/transformers';
|
||||
import type {
|
||||
APIRole,
|
||||
RESTPatchAPIGuildRoleJSONBody,
|
||||
@ -5,7 +6,6 @@ import type {
|
||||
RESTPostAPIGuildRoleJSONBody,
|
||||
} from '../../types';
|
||||
import { BaseShorter } from './base';
|
||||
import { Transformers } from '../../client/transformers';
|
||||
|
||||
export class RoleShorter extends BaseShorter {
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Transformers } from '../../client/transformers';
|
||||
import type { RESTPatchAPIGuildTemplateJSONBody, RESTPostAPIGuildTemplatesJSONBody } from '../../types';
|
||||
import { BaseShorter } from './base';
|
||||
import { Transformers } from '../../client/transformers';
|
||||
|
||||
export class TemplateShorter extends BaseShorter {
|
||||
fetch(code: string) {
|
||||
|
@ -1,3 +1,5 @@
|
||||
import type { ThreadChannelStructure } from '../../client/transformers';
|
||||
import { channelFrom } from '../../structures';
|
||||
import type {
|
||||
APIThreadMember,
|
||||
RESTGetAPIChannelThreadMembersQuery,
|
||||
@ -7,10 +9,8 @@ import type {
|
||||
RESTPostAPIChannelThreadsJSONBody,
|
||||
RESTPostAPIGuildForumThreadsJSONBody,
|
||||
} from '../../types';
|
||||
import { BaseShorter } from './base';
|
||||
import type { MakeRequired, When } from '../types/util';
|
||||
import type { ThreadChannelStructure } from '../../client/transformers';
|
||||
import { channelFrom } from '../../structures';
|
||||
import { BaseShorter } from './base';
|
||||
|
||||
export class ThreadShorter extends BaseShorter {
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
import type { APIGuildMember, APIPartialEmoji } from '../../types';
|
||||
import type { EmbedColors } from '..';
|
||||
import type { Attachment, AttachmentDataType, AttachmentResolvable } from '../../builders';
|
||||
import type { GuildMember } from '../../structures';
|
||||
import type { APIGuildMember, APIPartialEmoji } from '../../types';
|
||||
|
||||
export type EmojiResolvable = string | Partial<APIPartialEmoji> | `<${string | undefined}:${string}:${string}>`;
|
||||
export type GuildMemberResolvable = string | Partial<GuildMember> | APIGuildMember;
|
||||
|
@ -1,3 +1,13 @@
|
||||
import type { RawFile } from '../../api';
|
||||
import type {
|
||||
ActionRow,
|
||||
Attachment,
|
||||
AttachmentBuilder,
|
||||
BuilderComponents,
|
||||
Embed,
|
||||
Modal,
|
||||
PollBuilder,
|
||||
} from '../../builders';
|
||||
import type {
|
||||
APIActionRowComponent,
|
||||
APIEmbed,
|
||||
@ -11,16 +21,6 @@ import type {
|
||||
RESTPostAPIChannelMessageJSONBody,
|
||||
RESTPostAPIWebhookWithTokenJSONBody,
|
||||
} from '../../types';
|
||||
import type { RawFile } from '../../api';
|
||||
import type {
|
||||
ActionRow,
|
||||
Attachment,
|
||||
AttachmentBuilder,
|
||||
BuilderComponents,
|
||||
Embed,
|
||||
Modal,
|
||||
PollBuilder,
|
||||
} from '../../builders';
|
||||
|
||||
import type { OmitInsert } from './util';
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { fromComponent } from '../builders';
|
||||
import {
|
||||
type APIActionRowComponent,
|
||||
type APIActionRowComponentTypes,
|
||||
@ -10,7 +11,6 @@ import {
|
||||
type APIUserSelectComponent,
|
||||
ComponentType,
|
||||
} from '../types';
|
||||
import { fromComponent } from '../builders';
|
||||
|
||||
export class BaseComponent<T extends ComponentType> {
|
||||
constructor(public data: APIComponentsMap[T]) {}
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { Button } from '../builders';
|
||||
import type {
|
||||
APIButtonComponentWithCustomId,
|
||||
APIButtonComponentWithSKUId,
|
||||
@ -5,7 +6,6 @@ import type {
|
||||
ButtonStyle,
|
||||
ComponentType,
|
||||
} from '../types';
|
||||
import { Button } from '../builders';
|
||||
import { BaseComponent } from './BaseComponent';
|
||||
|
||||
export class LinkButtonComponent extends BaseComponent<ComponentType.Button> {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { ComponentType } from '../types';
|
||||
import type { ContextComponentCommandInteractionMap, ComponentContext } from './componentcontext';
|
||||
import type { ExtraProps, RegisteredMiddlewares, UsingClient } from '../commands';
|
||||
import { ComponentType } from '../types';
|
||||
import type { ComponentContext, ContextComponentCommandInteractionMap } from './componentcontext';
|
||||
|
||||
export const InteractionCommandType = {
|
||||
COMPONENT: 0,
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { ComponentType, MessageFlags } from '../types';
|
||||
import type {
|
||||
AllChannels,
|
||||
ButtonInteraction,
|
||||
@ -10,6 +9,12 @@ import type {
|
||||
StringSelectMenuInteraction,
|
||||
UserSelectMenuInteraction,
|
||||
} from '..';
|
||||
import type {
|
||||
GuildMemberStructure,
|
||||
GuildStructure,
|
||||
MessageStructure,
|
||||
WebhookMessageStructure,
|
||||
} from '../client/transformers';
|
||||
import type { CommandMetadata, ExtendContext, GlobalMetadata, RegisteredMiddlewares, UsingClient } from '../commands';
|
||||
import { BaseContext } from '../commands/basecontext';
|
||||
import type {
|
||||
@ -20,12 +25,7 @@ import type {
|
||||
UnionToTuple,
|
||||
When,
|
||||
} from '../common';
|
||||
import type {
|
||||
GuildMemberStructure,
|
||||
GuildStructure,
|
||||
MessageStructure,
|
||||
WebhookMessageStructure,
|
||||
} from '../client/transformers';
|
||||
import { ComponentType, MessageFlags } from '../types';
|
||||
|
||||
export interface ComponentContext<
|
||||
Type extends keyof ContextComponentCommandInteractionMap = keyof ContextComponentCommandInteractionMap,
|
||||
|
@ -1,5 +1,10 @@
|
||||
import { MessageFlags } from '../types';
|
||||
import type { AllChannels, ModalCommand, ModalSubmitInteraction, ReturnCache } from '..';
|
||||
import type {
|
||||
GuildMemberStructure,
|
||||
GuildStructure,
|
||||
MessageStructure,
|
||||
WebhookMessageStructure,
|
||||
} from '../client/transformers';
|
||||
import type { CommandMetadata, ExtendContext, GlobalMetadata, RegisteredMiddlewares, UsingClient } from '../commands';
|
||||
import { BaseContext } from '../commands/basecontext';
|
||||
import type {
|
||||
@ -9,12 +14,7 @@ import type {
|
||||
UnionToTuple,
|
||||
When,
|
||||
} from '../common';
|
||||
import type {
|
||||
GuildMemberStructure,
|
||||
GuildStructure,
|
||||
MessageStructure,
|
||||
WebhookMessageStructure,
|
||||
} from '../client/transformers';
|
||||
import { MessageFlags } from '../types';
|
||||
|
||||
export interface ModalContext extends BaseContext, ExtendContext {}
|
||||
|
||||
|
@ -1,24 +1,24 @@
|
||||
import type { Client, WorkerClient } from '../client';
|
||||
import type { UsingClient } from '../commands';
|
||||
import type { FileLoaded } from '../commands/handler';
|
||||
import {
|
||||
BaseHandler,
|
||||
type CamelCase,
|
||||
type MakeRequired,
|
||||
ReplaceRegex,
|
||||
type SnakeCase,
|
||||
isCloudfareWorker,
|
||||
magicImport,
|
||||
} from '../common';
|
||||
import type { ClientEvents } from '../events/hooks';
|
||||
import * as RawEvents from '../events/hooks';
|
||||
import type {
|
||||
GatewayDispatchPayload,
|
||||
GatewayMessageCreateDispatch,
|
||||
GatewayMessageDeleteBulkDispatch,
|
||||
GatewayMessageDeleteDispatch,
|
||||
} from '../types';
|
||||
import type { Client, WorkerClient } from '../client';
|
||||
import {
|
||||
BaseHandler,
|
||||
type CamelCase,
|
||||
ReplaceRegex,
|
||||
isCloudfareWorker,
|
||||
magicImport,
|
||||
type MakeRequired,
|
||||
type SnakeCase,
|
||||
} from '../common';
|
||||
import type { ClientEvents } from '../events/hooks';
|
||||
import * as RawEvents from '../events/hooks';
|
||||
import type { ClientEvent, CustomEvents, CustomEventsKeys, ClientNameEvents, EventContext } from './event';
|
||||
import type { FileLoaded } from '../commands/handler';
|
||||
import type { UsingClient } from '../commands';
|
||||
import type { ClientEvent, ClientNameEvents, CustomEvents, CustomEventsKeys, EventContext } from './event';
|
||||
|
||||
export type EventValue = MakeRequired<ClientEvent, '__filePath'> & { fired?: boolean };
|
||||
export type GatewayEvents = Uppercase<SnakeCase<keyof ClientEvents>>;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { GatewayApplicationCommandPermissionsUpdateDispatchData } from '../../types';
|
||||
import { toCamelCase } from '../../common';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { toCamelCase } from '../../common';
|
||||
import type { GatewayApplicationCommandPermissionsUpdateDispatchData } from '../../types';
|
||||
|
||||
export const APPLICATION_COMMAND_PERMISSIONS_UPDATE = (
|
||||
_self: UsingClient,
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { Transformers } from '../../client/transformers';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { toCamelCase } from '../../common';
|
||||
import type {
|
||||
GatewayAutoModerationActionExecutionDispatchData,
|
||||
GatewayAutoModerationRuleCreateDispatchData,
|
||||
GatewayAutoModerationRuleDeleteDispatchData,
|
||||
GatewayAutoModerationRuleUpdateDispatchData,
|
||||
} from '../../types';
|
||||
import { toCamelCase } from '../../common';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { Transformers } from '../../client/transformers';
|
||||
|
||||
export const AUTO_MODERATION_ACTION_EXECUTION = (
|
||||
_self: UsingClient,
|
||||
|
@ -5,9 +5,9 @@ import type {
|
||||
GatewayChannelUpdateDispatchData,
|
||||
} from '../../types';
|
||||
|
||||
import { toCamelCase } from '../../common';
|
||||
import { channelFrom, type AllChannels } from '../../structures';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { toCamelCase } from '../../common';
|
||||
import { type AllChannels, channelFrom } from '../../structures';
|
||||
|
||||
export const CHANNEL_CREATE = (self: UsingClient, data: GatewayChannelCreateDispatchData) => {
|
||||
return channelFrom(data, self);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { GatewayDispatchPayload, GatewayReadyDispatchData, GatewayResumedDispatch } from '../../types';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { Transformers } from '../../client/transformers';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import type { GatewayDispatchPayload, GatewayReadyDispatchData, GatewayResumedDispatch } from '../../types';
|
||||
|
||||
export const READY = (self: UsingClient, data: GatewayReadyDispatchData) => {
|
||||
return Transformers.ClientUser(self, data.user, data.application);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { APIEntitlement } from '../../types';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { Entitlement } from '../../structures/Entitlement';
|
||||
import type { APIEntitlement } from '../../types';
|
||||
|
||||
export const ENTITLEMENT_CREATE = (client: UsingClient, data: APIEntitlement) => {
|
||||
return new Entitlement(client, data);
|
||||
|
@ -1,3 +1,11 @@
|
||||
import {
|
||||
type GuildMemberStructure,
|
||||
type GuildRoleStructure,
|
||||
type GuildStructure,
|
||||
Transformers,
|
||||
} from '../../client/transformers';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { toCamelCase } from '../../common';
|
||||
import type {
|
||||
GatewayGuildAuditLogEntryCreateDispatchData,
|
||||
GatewayGuildBanAddDispatchData,
|
||||
@ -21,14 +29,6 @@ import type {
|
||||
GatewayGuildStickersUpdateDispatchData,
|
||||
GatewayGuildUpdateDispatchData,
|
||||
} from '../../types';
|
||||
import { toCamelCase } from '../../common';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import {
|
||||
type GuildMemberStructure,
|
||||
type GuildRoleStructure,
|
||||
type GuildStructure,
|
||||
Transformers,
|
||||
} from '../../client/transformers';
|
||||
|
||||
export const GUILD_AUDIT_LOG_ENTRY_CREATE = (_self: UsingClient, data: GatewayGuildAuditLogEntryCreateDispatchData) => {
|
||||
return toCamelCase(data);
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { Transformers } from '../../client/transformers';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { toCamelCase } from '../../common';
|
||||
import type {
|
||||
GatewayIntegrationCreateDispatchData,
|
||||
GatewayIntegrationDeleteDispatchData,
|
||||
GatewayIntegrationUpdateDispatchData,
|
||||
} from '../../types';
|
||||
import { toCamelCase } from '../../common';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { Transformers } from '../../client/transformers';
|
||||
|
||||
export const INTEGRATION_CREATE = (self: UsingClient, data: GatewayIntegrationCreateDispatchData) => {
|
||||
return data.user
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { GatewayInteractionCreateDispatchData } from '../../types';
|
||||
import { BaseInteraction } from '../../structures';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { BaseInteraction } from '../../structures';
|
||||
import type { GatewayInteractionCreateDispatchData } from '../../types';
|
||||
|
||||
export const INTERACTION_CREATE = (self: UsingClient, data: GatewayInteractionCreateDispatchData) => {
|
||||
return BaseInteraction.from(self, data);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { GatewayInviteCreateDispatchData, GatewayInviteDeleteDispatchData } from '../../types';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { toCamelCase } from '../../common';
|
||||
import type { GatewayInviteCreateDispatchData, GatewayInviteDeleteDispatchData } from '../../types';
|
||||
|
||||
export const INVITE_CREATE = (_self: UsingClient, data: GatewayInviteCreateDispatchData) => {
|
||||
return toCamelCase(data);
|
||||
|
@ -1,3 +1,6 @@
|
||||
import { type MessageStructure, Transformers } from '../../client/transformers';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { type ObjectToLower, type OmitInsert, toCamelCase } from '../../common';
|
||||
import type {
|
||||
GatewayMessageCreateDispatchData,
|
||||
GatewayMessageDeleteBulkDispatchData,
|
||||
@ -9,9 +12,6 @@ import type {
|
||||
GatewayMessageReactionRemoveEmojiDispatchData,
|
||||
GatewayMessageUpdateDispatchData,
|
||||
} from '../../types';
|
||||
import { type OmitInsert, toCamelCase, type ObjectToLower } from '../../common';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { type MessageStructure, Transformers } from '../../client/transformers';
|
||||
|
||||
export const MESSAGE_CREATE = (self: UsingClient, data: GatewayMessageCreateDispatchData) => {
|
||||
return Transformers.Message(self, data);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { GatewayPresenceUpdateDispatchData } from '../../types';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { toCamelCase } from '../../common';
|
||||
import type { GatewayPresenceUpdateDispatchData } from '../../types';
|
||||
|
||||
export const PRESENCE_UPDATE = async (self: UsingClient, data: GatewayPresenceUpdateDispatchData) => {
|
||||
return [toCamelCase(data), await self.cache.presences?.get(data.user.id)] as const;
|
||||
|
@ -1,11 +1,11 @@
|
||||
import type { StageInstances } from '../../cache/resources/stage-instances';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { type ObjectToLower, toCamelCase } from '../../common';
|
||||
import type {
|
||||
GatewayStageInstanceCreateDispatchData,
|
||||
GatewayStageInstanceDeleteDispatchData,
|
||||
GatewayStageInstanceUpdateDispatchData,
|
||||
} from '../../types';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { type ObjectToLower, toCamelCase } from '../../common';
|
||||
import type { StageInstances } from '../../cache/resources/stage-instances';
|
||||
|
||||
export const STAGE_INSTANCE_CREATE = (_self: UsingClient, data: GatewayStageInstanceCreateDispatchData) => {
|
||||
return toCamelCase(data);
|
||||
|
@ -1,3 +1,6 @@
|
||||
import { type ThreadChannelStructure, Transformers } from '../../client/transformers';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { toCamelCase } from '../../common';
|
||||
import type {
|
||||
GatewayThreadCreateDispatchData,
|
||||
GatewayThreadDeleteDispatchData,
|
||||
@ -6,9 +9,6 @@ import type {
|
||||
GatewayThreadMembersUpdateDispatchData,
|
||||
GatewayThreadUpdateDispatchData,
|
||||
} from '../../types';
|
||||
import { toCamelCase } from '../../common';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { type ThreadChannelStructure, Transformers } from '../../client/transformers';
|
||||
|
||||
export const THREAD_CREATE = (self: UsingClient, data: GatewayThreadCreateDispatchData) => {
|
||||
return Transformers.ThreadChannel(self, data);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import type { GatewayTypingStartDispatchData } from '../../types';
|
||||
import { toCamelCase } from '../../common';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { Transformers } from '../../client/transformers';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { toCamelCase } from '../../common';
|
||||
import type { GatewayTypingStartDispatchData } from '../../types';
|
||||
|
||||
export const TYPING_START = (self: UsingClient, data: GatewayTypingStartDispatchData) => {
|
||||
return data.member
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { GatewayUserUpdateDispatchData } from '../../types';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { Transformers, type UserStructure } from '../../client/transformers';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import type { GatewayUserUpdateDispatchData } from '../../types';
|
||||
|
||||
export const USER_UPDATE = async (
|
||||
self: UsingClient,
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { Transformers, type VoiceStateStructure } from '../../client/transformers';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { toCamelCase } from '../../common';
|
||||
import type {
|
||||
GatewayVoiceChannelEffectSendDispachData,
|
||||
GatewayVoiceServerUpdateDispatchData,
|
||||
GatewayVoiceStateUpdateDispatchData,
|
||||
} from '../../types';
|
||||
import { toCamelCase } from '../../common';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { Transformers, type VoiceStateStructure } from '../../client/transformers';
|
||||
|
||||
export const VOICE_SERVER_UPDATE = (_self: UsingClient, data: GatewayVoiceServerUpdateDispatchData) => {
|
||||
return toCamelCase(data);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { GatewayWebhooksUpdateDispatchData } from '../../types';
|
||||
import { toCamelCase } from '../../common';
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { toCamelCase } from '../../common';
|
||||
import type { GatewayWebhooksUpdateDispatchData } from '../../types';
|
||||
|
||||
export const WEBHOOKS_UPDATE = (_self: UsingClient, data: GatewayWebhooksUpdateDispatchData) => {
|
||||
return toCamelCase(data);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { BaseHandler, isCloudfareWorker, magicImport } from '../common';
|
||||
import { LangRouter } from './router';
|
||||
import type { FileLoaded } from '../commands/handler';
|
||||
import type { LocaleString, Locale } from '../types';
|
||||
import { BaseHandler, isCloudfareWorker, magicImport } from '../common';
|
||||
import type { Locale, LocaleString } from '../types';
|
||||
import { LangRouter } from './router';
|
||||
|
||||
export class LangsHandler extends BaseHandler {
|
||||
values: Partial<Record<string, any>> = {};
|
||||
|
@ -1,6 +1,8 @@
|
||||
import type { UsingClient } from '../commands';
|
||||
import type { ObjectToLower, StructPropState, StructStates, ToClass } from '../common/types/util';
|
||||
import type { APIGuild, APIPartialGuild, GatewayGuildCreateDispatchData, RESTPatchAPIGuildJSONBody } from '../types';
|
||||
import { AutoModerationRule } from './AutoModerationRule';
|
||||
import { GuildBan } from './GuildBan';
|
||||
import { GuildEmoji } from './GuildEmoji';
|
||||
import { GuildMember } from './GuildMember';
|
||||
import { GuildRole } from './GuildRole';
|
||||
@ -9,8 +11,6 @@ import { Sticker } from './Sticker';
|
||||
import { BaseChannel, WebhookGuildMethods } from './channels';
|
||||
import { BaseGuild } from './extra/BaseGuild';
|
||||
import type { DiscordBase } from './extra/DiscordBase';
|
||||
import { GuildBan } from './GuildBan';
|
||||
import type { APIGuild, APIPartialGuild, GatewayGuildCreateDispatchData, RESTPatchAPIGuildJSONBody } from '../types';
|
||||
|
||||
export interface Guild extends ObjectToLower<Omit<APIGuild, 'stickers' | 'emojis' | 'roles'>>, DiscordBase {}
|
||||
export class Guild<State extends StructStates = 'api'> extends (BaseGuild as unknown as ToClass<
|
||||
|
@ -1,8 +1,8 @@
|
||||
import type { UsingClient } from '../commands';
|
||||
import { Formatter, type MethodContext, type ObjectToLower } from '../common';
|
||||
import { DiscordBase } from './extra/DiscordBase';
|
||||
import type { BanShorter } from '../common/shorters/bans';
|
||||
import type { APIBan, RESTGetAPIGuildBansQuery } from '../types';
|
||||
import { DiscordBase } from './extra/DiscordBase';
|
||||
|
||||
export interface GuildBan extends DiscordBase, ObjectToLower<Omit<APIBan, 'id'>> {}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { BaseCDNUrlOptions } from '../api';
|
||||
import type { UsingClient } from '../commands';
|
||||
import { Formatter, type EmojiShorter, type MethodContext, type ObjectToLower } from '../common';
|
||||
import { type EmojiShorter, Formatter, type MethodContext, type ObjectToLower } from '../common';
|
||||
import type { APIEmoji, RESTPatchAPIChannelJSONBody, RESTPatchAPIGuildEmojiJSONBody } from '../types';
|
||||
import { DiscordBase } from './extra/DiscordBase';
|
||||
|
||||
|
@ -7,30 +7,30 @@ export type GuildMemberData =
|
||||
| GatewayGuildMemberAddDispatchData
|
||||
| APIInteractionDataResolvedGuildMember;
|
||||
|
||||
import type {
|
||||
APIGuildMember,
|
||||
GatewayGuildMemberUpdateDispatchData,
|
||||
GatewayGuildMemberAddDispatchData,
|
||||
APIInteractionDataResolvedGuildMember,
|
||||
RESTPutAPIGuildBanJSONBody,
|
||||
RESTPatchAPIGuildMemberJSONBody,
|
||||
RESTGetAPIGuildMembersSearchQuery,
|
||||
RESTPutAPIGuildMemberJSONBody,
|
||||
RESTGetAPIGuildMembersQuery,
|
||||
APIUser,
|
||||
} from '../types';
|
||||
import { Transformers, type UserStructure } from '../client/transformers';
|
||||
import type { UsingClient } from '../commands';
|
||||
import { PermissionsBitField } from './extra/Permissions';
|
||||
import {
|
||||
Formatter,
|
||||
type GuildMemberResolvable,
|
||||
type ImageOptions,
|
||||
type MessageCreateBodyRequest,
|
||||
type MethodContext,
|
||||
type ObjectToLower,
|
||||
type ToClass,
|
||||
type ImageOptions,
|
||||
type MethodContext,
|
||||
type GuildMemberResolvable,
|
||||
} from '../common';
|
||||
import { Transformers, type UserStructure } from '../client/transformers';
|
||||
import type {
|
||||
APIGuildMember,
|
||||
APIInteractionDataResolvedGuildMember,
|
||||
APIUser,
|
||||
GatewayGuildMemberAddDispatchData,
|
||||
GatewayGuildMemberUpdateDispatchData,
|
||||
RESTGetAPIGuildMembersQuery,
|
||||
RESTGetAPIGuildMembersSearchQuery,
|
||||
RESTPatchAPIGuildMemberJSONBody,
|
||||
RESTPutAPIGuildBanJSONBody,
|
||||
RESTPutAPIGuildMemberJSONBody,
|
||||
} from '../types';
|
||||
import { PermissionsBitField } from './extra/Permissions';
|
||||
|
||||
export interface BaseGuildMember extends DiscordBase, ObjectToLower<Omit<APIGuildMember, 'user' | 'roles'>> {}
|
||||
export class BaseGuildMember extends DiscordBase {
|
||||
|
@ -1,11 +1,11 @@
|
||||
import type { UsingClient } from '../commands';
|
||||
import { Formatter, type MethodContext, type ObjectToLower } from '../common';
|
||||
import type {
|
||||
APIRole,
|
||||
RESTPatchAPIGuildRoleJSONBody,
|
||||
RESTPatchAPIGuildRolePositionsJSONBody,
|
||||
RESTPostAPIGuildRoleJSONBody,
|
||||
} from '../types';
|
||||
import type { UsingClient } from '../commands';
|
||||
import { Formatter, type MethodContext, type ObjectToLower } from '../common';
|
||||
import { DiscordBase } from './extra/DiscordBase';
|
||||
import { PermissionsBitField } from './extra/Permissions';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { APITemplate, RESTPatchAPIGuildTemplateJSONBody, RESTPostAPIGuildTemplatesJSONBody } from '../types';
|
||||
import type { UsingClient } from '../commands';
|
||||
import type { MethodContext, ObjectToLower } from '../common';
|
||||
import type { APITemplate, RESTPatchAPIGuildTemplateJSONBody, RESTPostAPIGuildTemplatesJSONBody } from '../types';
|
||||
import { Base } from './extra/Base';
|
||||
|
||||
export interface GuildTemplate extends Base, ObjectToLower<APITemplate> {}
|
||||
|
@ -1,3 +1,18 @@
|
||||
import { Embed } from '..';
|
||||
import type { ListenerOptions } from '../builders';
|
||||
import {
|
||||
type GuildMemberStructure,
|
||||
type PollStructure,
|
||||
Transformers,
|
||||
type UserStructure,
|
||||
} from '../client/transformers';
|
||||
import type { UsingClient } from '../commands';
|
||||
import { type ObjectToLower, toCamelCase } from '../common';
|
||||
import { Formatter } from '../common';
|
||||
import type { EmojiResolvable } from '../common/types/resolvables';
|
||||
import type { MessageCreateBodyRequest, MessageUpdateBodyRequest } from '../common/types/write';
|
||||
import type { ActionRowMessageComponents } from '../components';
|
||||
import { MessageActionRowComponent } from '../components/ActionRow';
|
||||
import type {
|
||||
APIChannelMention,
|
||||
APIEmbed,
|
||||
@ -6,23 +21,8 @@ import type {
|
||||
APIUser,
|
||||
GatewayMessageCreateDispatchData,
|
||||
} from '../types';
|
||||
import type { ListenerOptions } from '../builders';
|
||||
import type { UsingClient } from '../commands';
|
||||
import { toCamelCase, type ObjectToLower } from '../common';
|
||||
import type { EmojiResolvable } from '../common/types/resolvables';
|
||||
import type { MessageCreateBodyRequest, MessageUpdateBodyRequest } from '../common/types/write';
|
||||
import type { ActionRowMessageComponents } from '../components';
|
||||
import { MessageActionRowComponent } from '../components/ActionRow';
|
||||
import type { MessageWebhookMethodEditParams, MessageWebhookMethodWriteParams } from './Webhook';
|
||||
import { DiscordBase } from './extra/DiscordBase';
|
||||
import { Formatter } from '../common';
|
||||
import { Embed } from '..';
|
||||
import {
|
||||
type PollStructure,
|
||||
Transformers,
|
||||
type GuildMemberStructure,
|
||||
type UserStructure,
|
||||
} from '../client/transformers';
|
||||
|
||||
export type MessageData = APIMessage | GatewayMessageCreateDispatchData;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import type { APIPoll } from '../types';
|
||||
import { toCamelCase, type ObjectToLower } from '../common';
|
||||
import { Base } from './extra/Base';
|
||||
import type { UsingClient } from '../commands';
|
||||
import type { ValidAnswerId } from '../api/Routes/channels';
|
||||
import type { UsingClient } from '../commands';
|
||||
import { type ObjectToLower, toCamelCase } from '../common';
|
||||
import type { APIPoll } from '../types';
|
||||
import { Base } from './extra/Base';
|
||||
|
||||
export interface Poll extends ObjectToLower<APIPoll> {}
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
import type { APISticker, RESTPatchAPIGuildStickerJSONBody, RESTPostAPIGuildStickerFormDataBody } from '../types';
|
||||
import type { RawFile, UsingClient } from '..';
|
||||
import type { Attachment, AttachmentBuilder } from '../builders';
|
||||
import type { MethodContext, ObjectToLower } from '../common';
|
||||
import { DiscordBase } from './extra/DiscordBase';
|
||||
import { Transformers, type UserStructure } from '../client/transformers';
|
||||
import type { MethodContext, ObjectToLower } from '../common';
|
||||
import type { APISticker, RESTPatchAPIGuildStickerJSONBody, RESTPostAPIGuildStickerFormDataBody } from '../types';
|
||||
import { DiscordBase } from './extra/DiscordBase';
|
||||
|
||||
export interface Sticker extends DiscordBase, ObjectToLower<Omit<APISticker, 'user'>> {}
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
import { type AnonymousGuildStructure, Transformers, type UserStructure } from '../client/transformers';
|
||||
import type { UsingClient } from '../commands';
|
||||
import type {
|
||||
ImageOptions,
|
||||
MessageWebhookCreateBodyRequest,
|
||||
MessageWebhookPayload,
|
||||
MessageWebhookUpdateBodyRequest,
|
||||
MethodContext,
|
||||
ObjectToLower,
|
||||
} from '../common';
|
||||
/**
|
||||
* Represents a Discord webhook.
|
||||
*/
|
||||
@ -8,17 +18,7 @@ import type {
|
||||
RESTPatchAPIWebhookWithTokenJSONBody,
|
||||
RESTPostAPIWebhookWithTokenQuery,
|
||||
} from '../types';
|
||||
import type { UsingClient } from '../commands';
|
||||
import type {
|
||||
ImageOptions,
|
||||
MessageWebhookCreateBodyRequest,
|
||||
MessageWebhookPayload,
|
||||
MessageWebhookUpdateBodyRequest,
|
||||
MethodContext,
|
||||
ObjectToLower,
|
||||
} from '../common';
|
||||
import { DiscordBase } from './extra/DiscordBase';
|
||||
import { type AnonymousGuildStructure, Transformers, type UserStructure } from '../client/transformers';
|
||||
|
||||
export interface Webhook extends DiscordBase, ObjectToLower<Omit<APIWebhook, 'user' | 'source_guild'>> {}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import type { WorkerClient } from '../..';
|
||||
import { calculateShardId, type ObjectToLower } from '../../common';
|
||||
import { type ObjectToLower, calculateShardId } from '../../common';
|
||||
import type { ImageOptions } from '../../common/types/options';
|
||||
import { type APIPartialGuild, GuildFeature } from '../../types';
|
||||
import type { ShardManager } from '../../websocket';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { UsingClient } from '../../commands';
|
||||
import { Base } from './Base';
|
||||
import { snowflakeToTimestamp } from '../../common/it/utils';
|
||||
import { Base } from './Base';
|
||||
|
||||
export class DiscordBase<Data extends Record<string, any> = { id: string }> extends Base {
|
||||
id: string;
|
||||
|
@ -1,39 +1,39 @@
|
||||
// https://github.com/discordjs/discord-api-types/blob/main/gateway/v10.ts
|
||||
|
||||
import type { Snowflake, ChannelType, GatewayDispatchEvents, GatewayOpcodes } from './index';
|
||||
import type { ChannelType, GatewayDispatchEvents, GatewayOpcodes, Snowflake } from './index';
|
||||
import type { GatewayPresenceUpdate } from './payloads/gateway';
|
||||
import type {
|
||||
APIApplication,
|
||||
APIApplicationCommandPermission,
|
||||
APIAutoModerationRule,
|
||||
APIAuditLogEntry,
|
||||
APIAutoModerationAction,
|
||||
APIAutoModerationRule,
|
||||
APIChannel,
|
||||
APIEmoji,
|
||||
APIEntitlement,
|
||||
APIGuild,
|
||||
APIGuildIntegration,
|
||||
APIGuildMember,
|
||||
APIGuildScheduledEvent,
|
||||
APIInteraction,
|
||||
APIMessage,
|
||||
APIPartialEmoji,
|
||||
APIRole,
|
||||
APIStageInstance,
|
||||
APISticker,
|
||||
APISubscription,
|
||||
APIThreadChannel,
|
||||
APIThreadMember,
|
||||
APIUnavailableGuild,
|
||||
APIUser,
|
||||
APIVoiceState,
|
||||
AutoModerationRuleTriggerType,
|
||||
GatewayActivity,
|
||||
InviteTargetType,
|
||||
PresenceUpdateStatus,
|
||||
GatewayPresenceUpdate as RawGatewayPresenceUpdate,
|
||||
GatewayThreadListSync as RawGatewayThreadListSync,
|
||||
GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate,
|
||||
APIVoiceState,
|
||||
InviteTargetType,
|
||||
PresenceUpdateStatus,
|
||||
AutoModerationRuleTriggerType,
|
||||
APIAuditLogEntry,
|
||||
APIEntitlement,
|
||||
APIPartialEmoji,
|
||||
APISubscription,
|
||||
} from './payloads/index';
|
||||
import type { ReactionType } from './rest/index';
|
||||
import type { AnimationTypes, Nullable } from './utils';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { InteractionContextType, ApplicationIntegrationType } from '..';
|
||||
import type { ApplicationIntegrationType, InteractionContextType } from '..';
|
||||
import type { ChannelType, Snowflake } from '../..';
|
||||
|
||||
import type { LocaleString } from '../../rest';
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Types extracted from https://discord.com/developers/docs/resources/channel
|
||||
*/
|
||||
|
||||
import type { Permissions, Snowflake, ChannelType, OverwriteType, VideoQualityMode } from '../index';
|
||||
import type { ChannelType, OverwriteType, Permissions, Snowflake, VideoQualityMode } from '../index';
|
||||
import type { APIApplication } from './application';
|
||||
import type { APIPartialEmoji } from './emoji';
|
||||
import type { APIGuildMember } from './guild';
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Types extracted from https://discord.com/developers/docs/resources/guild
|
||||
*/
|
||||
|
||||
import type { Permissions, Snowflake, GuildMemberFlags } from '../index';
|
||||
import type { GuildMemberFlags, Permissions, Snowflake } from '../index';
|
||||
import type { APIEmoji, APIPartialEmoji } from './emoji';
|
||||
import type { PresenceUpdateReceiveStatus } from './gateway';
|
||||
import type { OAuth2Scopes } from './oauth2';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { APIApplicationRoleConnectionMetadata, APIApplication, APIEmoji } from '../payloads';
|
||||
import type { StrictPartial, Nullable } from '../utils';
|
||||
import type { RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody } from './emoji';
|
||||
import type { APIApplication, APIApplicationRoleConnectionMetadata, APIEmoji } from '../payloads';
|
||||
import type { Nullable, StrictPartial } from '../utils';
|
||||
import type { RESTPatchAPIGuildEmojiJSONBody, RESTPostAPIGuildEmojiJSONBody } from './emoji';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records
|
||||
|
@ -1,5 +1,5 @@
|
||||
import type { Snowflake } from '..';
|
||||
import type { AuditLogEvent, APIAuditLog } from '../payloads';
|
||||
import type { APIAuditLog, AuditLogEvent } from '../payloads';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log
|
||||
|
@ -1,28 +1,28 @@
|
||||
import type { Snowflake, ChannelType, VideoQualityMode, OverwriteType, Permissions } from '..';
|
||||
import type { ChannelType, OverwriteType, Permissions, Snowflake, VideoQualityMode } from '..';
|
||||
|
||||
import type {
|
||||
APIChannel,
|
||||
ThreadAutoArchiveDuration,
|
||||
ChannelFlags,
|
||||
APIGuildForumTag,
|
||||
APIGuildForumDefaultReactionEmoji,
|
||||
SortOrderType,
|
||||
ForumLayoutType,
|
||||
APIMessage,
|
||||
APIMessageReference,
|
||||
APIEmbed,
|
||||
APIAllowedMentions,
|
||||
APIActionRowComponent,
|
||||
APIMessageActionRowComponent,
|
||||
MessageFlags,
|
||||
APIUser,
|
||||
APIExtendedInvite,
|
||||
InviteTargetType,
|
||||
APIFollowedChannel,
|
||||
ThreadChannelType,
|
||||
APIThreadMember,
|
||||
APIThreadList,
|
||||
APIAllowedMentions,
|
||||
APIAttachment,
|
||||
APIChannel,
|
||||
APIEmbed,
|
||||
APIExtendedInvite,
|
||||
APIFollowedChannel,
|
||||
APIGuildForumDefaultReactionEmoji,
|
||||
APIGuildForumTag,
|
||||
APIMessage,
|
||||
APIMessageActionRowComponent,
|
||||
APIMessageReference,
|
||||
APIThreadList,
|
||||
APIThreadMember,
|
||||
APIUser,
|
||||
ChannelFlags,
|
||||
ForumLayoutType,
|
||||
InviteTargetType,
|
||||
MessageFlags,
|
||||
SortOrderType,
|
||||
ThreadAutoArchiveDuration,
|
||||
ThreadChannelType,
|
||||
} from '../payloads';
|
||||
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../utils';
|
||||
import type { RESTAPIPollCreate } from './poll';
|
||||
|
@ -1,39 +1,39 @@
|
||||
import type { Snowflake } from '..';
|
||||
import type {
|
||||
APIBan,
|
||||
APIChannel,
|
||||
APIDMChannel,
|
||||
APIGroupDMChannel,
|
||||
GuildVerificationLevel,
|
||||
GuildDefaultMessageNotifications,
|
||||
GuildExplicitContentFilter,
|
||||
GuildSystemChannelFlags,
|
||||
APIGuild,
|
||||
GuildMFALevel,
|
||||
APIGuildPreview,
|
||||
GuildFeature,
|
||||
APIThreadList,
|
||||
APIGuildMember,
|
||||
APIBan,
|
||||
APIRole,
|
||||
APIVoiceRegion,
|
||||
APIExtendedInvite,
|
||||
APIGroupDMChannel,
|
||||
APIGuild,
|
||||
APIGuildIntegration,
|
||||
APIGuildWidgetSettings,
|
||||
APIGuildWidget,
|
||||
GuildWidgetStyle,
|
||||
APIGuildMember,
|
||||
APIGuildMembershipScreening,
|
||||
APIGuildWelcomeScreen,
|
||||
APIGuildOnboarding,
|
||||
APIGuildOnboardingPrompt,
|
||||
APIGuildOnboardingPromptOption,
|
||||
APIGuildPreview,
|
||||
APIGuildWelcomeScreen,
|
||||
APIGuildWidget,
|
||||
APIGuildWidgetSettings,
|
||||
APIRole,
|
||||
APIThreadList,
|
||||
APIVoiceRegion,
|
||||
GuildDefaultMessageNotifications,
|
||||
GuildExplicitContentFilter,
|
||||
GuildFeature,
|
||||
GuildMFALevel,
|
||||
GuildSystemChannelFlags,
|
||||
GuildVerificationLevel,
|
||||
GuildWidgetStyle,
|
||||
} from '../payloads';
|
||||
import type {
|
||||
StrictPartial,
|
||||
DistributivePick,
|
||||
DistributiveOmit,
|
||||
StrictRequired,
|
||||
Nullable,
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
|
||||
DistributiveOmit,
|
||||
DistributivePick,
|
||||
Nullable,
|
||||
StrictPartial,
|
||||
StrictRequired,
|
||||
} from '../utils';
|
||||
import type { RESTPutAPIChannelPermissionJSONBody } from './channel';
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
import type { Snowflake } from '..';
|
||||
import type {
|
||||
APIGuildScheduledEvent,
|
||||
GuildScheduledEventPrivacyLevel,
|
||||
GuildScheduledEventEntityType,
|
||||
APIGuildScheduledEventEntityMetadata,
|
||||
GuildScheduledEventStatus,
|
||||
APIGuildScheduledEventUser,
|
||||
GuildScheduledEventEntityType,
|
||||
GuildScheduledEventPrivacyLevel,
|
||||
GuildScheduledEventStatus,
|
||||
} from '../payloads';
|
||||
import type { StrictPartial } from '../utils';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import type { Snowflake } from '..';
|
||||
import type { APIApplication, OAuth2Scopes, APIUser, APIGuild, APIWebhook } from '../payloads';
|
||||
import type { APIApplication, APIGuild, APIUser, APIWebhook, OAuth2Scopes } from '../payloads';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { Snowflake, APIMessage, APIPoll, APIPollAnswer, APIUser } from '../index';
|
||||
import type { APIMessage, APIPoll, APIPollAnswer, APIUser, Snowflake } from '../index';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/poll#get-answer-voters
|
||||
|
@ -1,5 +1,5 @@
|
||||
import type { Snowflake } from '..';
|
||||
import type { StageInstancePrivacyLevel, APIStageInstance } from '../payloads';
|
||||
import type { APIStageInstance, StageInstancePrivacyLevel } from '../payloads';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/stage-instance#create-stage-instance
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { APITemplate, APIGuild } from '../payloads';
|
||||
import type { APIGuild, APITemplate } from '../payloads';
|
||||
import type { StrictPartial } from '../utils';
|
||||
|
||||
/**
|
||||
|
@ -1,11 +1,11 @@
|
||||
import type { Snowflake } from '..';
|
||||
import type {
|
||||
APIUser,
|
||||
APIGuildMember,
|
||||
GuildFeature,
|
||||
APIApplicationRoleConnection,
|
||||
APIChannel,
|
||||
APIConnection,
|
||||
APIApplicationRoleConnection,
|
||||
APIGuildMember,
|
||||
APIUser,
|
||||
GuildFeature,
|
||||
} from '../payloads';
|
||||
|
||||
/**
|
||||
|
@ -1,12 +1,12 @@
|
||||
import type { Snowflake } from '..';
|
||||
import type {
|
||||
APIWebhook,
|
||||
APIEmbed,
|
||||
APIAllowedMentions,
|
||||
APIActionRowComponent,
|
||||
APIMessageActionRowComponent,
|
||||
MessageFlags,
|
||||
APIAllowedMentions,
|
||||
APIEmbed,
|
||||
APIMessage,
|
||||
APIMessageActionRowComponent,
|
||||
APIWebhook,
|
||||
MessageFlags,
|
||||
} from '../payloads';
|
||||
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../utils';
|
||||
import type { RESTAPIAttachment } from './channel';
|
||||
|
@ -1,66 +1,66 @@
|
||||
import type { RestToKeys } from '../common';
|
||||
import type {
|
||||
GatewayActivity,
|
||||
PresenceUpdateStatus,
|
||||
GatewayPresenceUpdateData,
|
||||
GatewayRequestGuildMembersDataWithQuery,
|
||||
GatewayRequestGuildMembersDataWithUserIds,
|
||||
APIGuildMember,
|
||||
APIUser,
|
||||
GatewayReadyDispatchData,
|
||||
GatewayChannelUpdateDispatchData,
|
||||
GatewayAutoModerationActionExecutionDispatchData,
|
||||
GatewayThreadCreateDispatchData,
|
||||
GatewayThreadDeleteDispatchData,
|
||||
GatewayThreadListSyncDispatchData,
|
||||
GatewayThreadMemberUpdateDispatchData,
|
||||
GatewayThreadMembersUpdateDispatchData,
|
||||
GatewayChannelPinsUpdateDispatchData,
|
||||
GatewayGuildCreateDispatchData,
|
||||
APIGuild,
|
||||
GatewayGuildDeleteDispatchData,
|
||||
APIAuditLogEntry,
|
||||
APIAutoModerationRule,
|
||||
APIChannel,
|
||||
APIEntitlement,
|
||||
APIGuild,
|
||||
APIGuildMember,
|
||||
APIGuildScheduledEvent,
|
||||
APIStageInstance,
|
||||
APISubscription,
|
||||
APIUser,
|
||||
GatewayActivity,
|
||||
GatewayAutoModerationActionExecutionDispatchData,
|
||||
GatewayChannelPinsUpdateDispatchData,
|
||||
GatewayChannelUpdateDispatchData,
|
||||
GatewayEntitlementCreateDispatchData,
|
||||
GatewayGuildBanAddDispatchData,
|
||||
GatewayGuildBanRemoveDispatchData,
|
||||
GatewayGuildCreateDispatchData,
|
||||
GatewayGuildDeleteDispatchData,
|
||||
GatewayGuildEmojisUpdateDispatchData,
|
||||
GatewayGuildStickersUpdateDispatchData,
|
||||
GatewayGuildIntegrationsUpdateDispatchData,
|
||||
GatewayGuildMemberAddDispatchData,
|
||||
GatewayGuildMemberRemoveDispatchData,
|
||||
GatewayGuildMemberUpdateDispatchData,
|
||||
GatewayGuildMembersChunkDispatchData,
|
||||
GatewayGuildRoleCreateDispatchData,
|
||||
GatewayGuildRoleUpdateDispatchData,
|
||||
GatewayGuildRoleDeleteDispatchData,
|
||||
GatewayGuildRoleUpdateDispatchData,
|
||||
GatewayGuildScheduledEventUserRemoveDispatchData,
|
||||
GatewayGuildStickersUpdateDispatchData,
|
||||
GatewayIntegrationCreateDispatchData,
|
||||
GatewayIntegrationDeleteDispatchData,
|
||||
GatewayInteractionCreateDispatchData,
|
||||
GatewayInviteCreateDispatchData,
|
||||
GatewayInviteDeleteDispatchData,
|
||||
GatewayMessageCreateDispatchData,
|
||||
GatewayMessageUpdateDispatchData,
|
||||
GatewayMessageDeleteDispatchData,
|
||||
GatewayMessageDeleteBulkDispatchData,
|
||||
GatewayMessageDeleteDispatchData,
|
||||
GatewayMessagePollVoteDispatchData,
|
||||
GatewayMessageReactionAddDispatchData,
|
||||
GatewayMessageReactionRemoveDispatchData,
|
||||
GatewayMessageReactionRemoveAllDispatchData,
|
||||
GatewayMessageReactionRemoveDispatchData,
|
||||
GatewayMessageReactionRemoveEmojiDispatchData,
|
||||
GatewayMessageUpdateDispatchData,
|
||||
GatewayPresenceUpdateData,
|
||||
GatewayPresenceUpdateDispatchData,
|
||||
GatewayReadyDispatchData,
|
||||
GatewayRequestGuildMembersDataWithQuery,
|
||||
GatewayRequestGuildMembersDataWithUserIds,
|
||||
GatewayThreadCreateDispatchData,
|
||||
GatewayThreadDeleteDispatchData,
|
||||
GatewayThreadListSyncDispatchData,
|
||||
GatewayThreadMemberUpdateDispatchData,
|
||||
GatewayThreadMembersUpdateDispatchData,
|
||||
GatewayTypingStartDispatchData,
|
||||
GatewayUserUpdateDispatchData,
|
||||
GatewayVoiceStateUpdateData,
|
||||
GatewayVoiceServerUpdateDispatchData,
|
||||
GatewayWebhooksUpdateDispatchData,
|
||||
GatewayInteractionCreateDispatchData,
|
||||
APIStageInstance,
|
||||
GatewayMessagePollVoteDispatchData,
|
||||
GatewayIntegrationCreateDispatchData,
|
||||
GatewayGuildScheduledEventUserRemoveDispatchData,
|
||||
APIGuildScheduledEvent,
|
||||
APIChannel,
|
||||
APIAutoModerationRule,
|
||||
APIEntitlement,
|
||||
GatewayVoiceChannelEffectSendDispachData,
|
||||
APISubscription,
|
||||
GatewayEntitlementCreateDispatchData,
|
||||
GatewayVoiceServerUpdateDispatchData,
|
||||
GatewayVoiceStateUpdateData,
|
||||
GatewayWebhooksUpdateDispatchData,
|
||||
PresenceUpdateStatus,
|
||||
} from '../types';
|
||||
import { GatewayDispatchEvents } from '../types';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { delay, type Logger } from '../../common';
|
||||
import { type Logger, delay } from '../../common';
|
||||
|
||||
/**
|
||||
* options of the dynamic bucket
|
||||
|
Loading…
x
Reference in New Issue
Block a user