chore: organize imports

This commit is contained in:
MARCROCK22 2024-09-15 19:52:43 +00:00
parent eb19b72c0d
commit a355d843ad
89 changed files with 380 additions and 380 deletions

View File

@ -1,20 +1,32 @@
import type { import type {
RESTDeleteAPIApplicationEmojiResult,
RESTGetAPIApplicationCommandResult, RESTGetAPIApplicationCommandResult,
RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsQuery,
RESTGetAPIApplicationCommandsResult, RESTGetAPIApplicationCommandsResult,
RESTGetAPIApplicationEmojiResult,
RESTGetAPIApplicationEmojisResult,
RESTGetAPIApplicationGuildCommandResult, RESTGetAPIApplicationGuildCommandResult,
RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsQuery,
RESTGetAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandsResult,
RESTGetAPIApplicationRoleConnectionMetadataResult, RESTGetAPIApplicationRoleConnectionMetadataResult,
RESTGetAPIEntitlementsQuery,
RESTGetAPIEntitlementsResult,
RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult,
RESTGetAPISKUsResult,
RESTPatchAPIApplicationCommandJSONBody, RESTPatchAPIApplicationCommandJSONBody,
RESTPatchAPIApplicationCommandResult, RESTPatchAPIApplicationCommandResult,
RESTPatchAPIApplicationEmojiJSONBody,
RESTPatchAPIApplicationEmojiResult,
RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandJSONBody,
RESTPatchAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandResult,
RESTPostAPIApplicationCommandsJSONBody, RESTPostAPIApplicationCommandsJSONBody,
RESTPostAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsResult,
RESTPostAPIApplicationEmojiJSONBody,
RESTPostAPIApplicationEmojiResult,
RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsJSONBody,
RESTPostAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsResult,
RESTPostAPIEntitlementBody,
RESTPostAPIEntitlementResult,
RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPutAPIApplicationCommandPermissionsJSONBody,
RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsJSONBody,
RESTPutAPIApplicationCommandsResult, RESTPutAPIApplicationCommandsResult,
@ -23,18 +35,6 @@ import type {
RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataJSONBody,
RESTPutAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataResult,
RESTPutAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIGuildApplicationCommandsPermissionsResult,
RESTGetAPIApplicationEmojiResult,
RESTGetAPIApplicationEmojisResult,
RESTPostAPIApplicationEmojiJSONBody,
RESTPatchAPIApplicationEmojiJSONBody,
RESTPostAPIApplicationEmojiResult,
RESTPatchAPIApplicationEmojiResult,
RESTDeleteAPIApplicationEmojiResult,
RESTGetAPIEntitlementsResult,
RESTGetAPIEntitlementsQuery,
RESTPostAPIEntitlementBody,
RESTPostAPIEntitlementResult,
RESTGetAPISKUsResult,
} from '../../types'; } from '../../types';
import type { ProxyRequestMethod } from '../Router'; import type { ProxyRequestMethod } from '../Router';

View File

@ -1,10 +1,10 @@
import type { import type {
RESTGetAPISKUSubscriptionsResult,
RESTGetAPISKUSubscriptionsQuery,
RESTGetAPISKUSubscriptionResult, RESTGetAPISKUSubscriptionResult,
RESTGetAPISKUSubscriptionsQuery,
RESTGetAPISKUSubscriptionsResult,
} from '../../types'; } from '../../types';
import type { RestArguments } from '../api';
import type { ProxyRequestMethod } from '../Router'; import type { ProxyRequestMethod } from '../Router';
import type { RestArguments } from '../api';
export interface SKuRoutes { export interface SKuRoutes {
skus(id: string): { skus(id: string): {

View File

@ -1,10 +1,10 @@
import type { RestOrArray } from '../common/types/util';
import { import {
ComponentType,
type APIActionRowComponent, type APIActionRowComponent,
type APIActionRowComponentTypes, type APIActionRowComponentTypes,
type APIMessageActionRowComponent, type APIMessageActionRowComponent,
ComponentType,
} from '../types'; } from '../types';
import type { RestOrArray } from '../common/types/util';
import { BaseComponentBuilder } from './Base'; import { BaseComponentBuilder } from './Base';
import { fromComponent } from './index'; import { fromComponent } from './index';
import type { BuilderComponents, FixedComponents } from './types'; import type { BuilderComponents, FixedComponents } from './types';

View File

@ -1,5 +1,5 @@
import { type APIMessageComponentEmoji, type ButtonStyle, ComponentType, type APIButtonComponent } from '../types'; import { type EmojiResolvable, resolvePartialEmoji } from '../common';
import { resolvePartialEmoji, type EmojiResolvable } from '../common'; import { type APIButtonComponent, type APIMessageComponentEmoji, type ButtonStyle, ComponentType } from '../types';
/** /**
* Represents a button component. * Represents a button component.

View File

@ -1,5 +1,5 @@
import { type ColorResolvable, type ObjectToLower, type RestOrArray, resolveColor, toSnakeCase } from '../common';
import type { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter } from '../types'; import type { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter } from '../types';
import { resolveColor, toSnakeCase, type ColorResolvable, type ObjectToLower, type RestOrArray } from '../common';
/** /**
* Represents a message embed. * Represents a message embed.

View File

@ -1,3 +1,4 @@
import type { RestOrArray } from '../common';
import { import {
type APIActionRowComponent, type APIActionRowComponent,
type APIModalInteractionResponseCallbackData, type APIModalInteractionResponseCallbackData,
@ -5,7 +6,6 @@ import {
ComponentType, ComponentType,
type TextInputStyle, type TextInputStyle,
} from '../types'; } from '../types';
import type { RestOrArray } from '../common';
import type { ActionRow } from './ActionRow'; import type { ActionRow } from './ActionRow';
import { BaseComponentBuilder, type OptionValuesLength } from './Base'; import { BaseComponentBuilder, type OptionValuesLength } from './Base';
import { fromComponent } from './index'; import { fromComponent } from './index';

View File

@ -1,5 +1,5 @@
import { type DeepPartial, type EmojiResolvable, type RestOrArray, resolvePartialEmoji } from '../common';
import { type APIPollMedia, PollLayoutType, type RESTAPIPollCreate } from '../types'; import { type APIPollMedia, PollLayoutType, type RESTAPIPollCreate } from '../types';
import { resolvePartialEmoji, type DeepPartial, type EmojiResolvable, type RestOrArray } from '../common';
export class PollBuilder { export class PollBuilder {
constructor(public data: DeepPartial<RESTAPIPollCreate> = {}) { constructor(public data: DeepPartial<RESTAPIPollCreate> = {}) {

View File

@ -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 { import {
type APIChannelSelectComponent, type APIChannelSelectComponent,
type APIMentionableSelectComponent, type APIMentionableSelectComponent,
@ -12,16 +22,6 @@ import {
ComponentType, ComponentType,
SelectMenuDefaultValueType, SelectMenuDefaultValueType,
} from '../types'; } 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'; import { BaseComponentBuilder, type OptionValuesLength } from './Base';
export type BuilderSelectMenus = export type BuilderSelectMenus =

View File

@ -1,8 +1,8 @@
import type { APIBan, GatewayGuildBanModifyDispatchData } from '../../types';
import type { ReturnCache } from '../..'; import type { ReturnCache } from '../..';
import { fakePromise } from '../../common';
import { GuildBasedResource } from './default/guild-based';
import { type GuildBanStructure, Transformers } from '../../client/transformers'; 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> { export class Bans extends GuildBasedResource<any, GatewayGuildBanModifyDispatchData | APIBan> {
namespace = 'ban'; namespace = 'ban';

View File

@ -1,6 +1,6 @@
import type { APIChannel } from '../../types';
import { fakePromise } from '../../common'; 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 type { ReturnCache } from '../index';
import { GuildRelatedResource } from './default/guild-related'; import { GuildRelatedResource } from './default/guild-related';

View File

@ -1,8 +1,8 @@
import type { APIEmoji } from '../../types';
import type { ReturnCache } from '../..'; import type { ReturnCache } from '../..';
import { fakePromise } from '../../common';
import { GuildRelatedResource } from './default/guild-related';
import { type GuildEmojiStructure, Transformers } from '../../client/transformers'; 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> { export class Emojis extends GuildRelatedResource<any, APIEmoji> {
namespace = 'emoji'; namespace = 'emoji';

View File

@ -1,8 +1,8 @@
import type { APIGuild, GatewayGuildCreateDispatchData } from '../../types';
import type { Cache, ReturnCache } from '..'; import type { Cache, ReturnCache } from '..';
import { fakePromise } from '../../common';
import { BaseResource } from './default/base';
import { type GuildStructure, Transformers } from '../../client/transformers'; 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> { export class Guilds extends BaseResource<any, APIGuild | GatewayGuildCreateDispatchData> {
namespace = 'guild'; namespace = 'guild';

View File

@ -1,8 +1,8 @@
import type { APIGuildMember } from '../../types';
import type { ReturnCache } from '../..'; import type { ReturnCache } from '../..';
import { fakePromise } from '../../common';
import { GuildBasedResource } from './default/guild-based';
import { type GuildMemberStructure, Transformers } from '../../client/transformers'; 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> { export class Members extends GuildBasedResource<any, APIGuildMember> {
namespace = 'member'; namespace = 'member';

View File

@ -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 type { APIMessage, APIUser } from '../../types';
import { GuildRelatedResource } from './default/guild-related'; 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> { export class Messages extends GuildRelatedResource<any, APIMessage> {
namespace = 'message'; namespace = 'message';

View File

@ -1,7 +1,7 @@
import type { APIOverwrite } from '../../types';
import type { ReturnCache } from '../..'; import type { ReturnCache } from '../..';
import { fakePromise } from '../../common/it/utils'; import { fakePromise } from '../../common/it/utils';
import { PermissionsBitField } from '../../structures/extra/Permissions'; import { PermissionsBitField } from '../../structures/extra/Permissions';
import type { APIOverwrite } from '../../types';
import { GuildRelatedResource } from './default/guild-related'; import { GuildRelatedResource } from './default/guild-related';
export class Overwrites extends GuildRelatedResource<any, APIOverwrite[]> { export class Overwrites extends GuildRelatedResource<any, APIOverwrite[]> {

View File

@ -1,8 +1,8 @@
import type { APIRole } from '../../types';
import type { ReturnCache } from '../..'; import type { ReturnCache } from '../..';
import { fakePromise } from '../../common';
import { GuildRelatedResource } from './default/guild-related';
import { type GuildRoleStructure, Transformers } from '../../client/transformers'; 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> { export class Roles extends GuildRelatedResource<any, APIRole> {
namespace = 'role'; namespace = 'role';

View File

@ -1,8 +1,8 @@
import type { APISticker } from '../../types';
import type { ReturnCache } from '../..'; import type { ReturnCache } from '../..';
import { fakePromise } from '../../common';
import { GuildRelatedResource } from './default/guild-related';
import { type StickerStructure, Transformers } from '../../client/transformers'; 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> { export class Stickers extends GuildRelatedResource<any, APISticker> {
namespace = 'sticker'; namespace = 'sticker';

View File

@ -1,8 +1,8 @@
import type { APIThreadChannel } from '../../types';
import type { ReturnCache } from '../..'; import type { ReturnCache } from '../..';
import { fakePromise } from '../../common';
import { GuildRelatedResource } from './default/guild-related';
import { type ThreadChannelStructure, Transformers } from '../../client/transformers'; 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> { export class Threads extends GuildRelatedResource<any, APIThreadChannel> {
namespace = 'thread'; namespace = 'thread';

View File

@ -1,8 +1,8 @@
import type { APIUser } from '../../types';
import type { ReturnCache } from '../..'; import type { ReturnCache } from '../..';
import { fakePromise } from '../../common';
import { BaseResource } from './default/base';
import { Transformers, type UserStructure } from '../../client/transformers'; 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> { export class Users extends BaseResource<any, APIUser> {
namespace = 'user'; namespace = 'user';

View File

@ -1,8 +1,8 @@
import type { APIVoiceState } from '../../types';
import type { ReturnCache } from '../..'; import type { ReturnCache } from '../..';
import { fakePromise } from '../../common';
import { GuildBasedResource } from './default/guild-based';
import { Transformers, type VoiceStateStructure } from '../../client/transformers'; 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> { export class VoiceStates extends GuildBasedResource<any, APIVoiceState> {
namespace = 'voice_state'; namespace = 'voice_state';

View File

@ -1,9 +1,9 @@
import { error } from 'node:console';
import { randomUUID } from 'node:crypto'; import { randomUUID } from 'node:crypto';
import type { UsingClient } from '../commands';
import type { Awaitable, CamelCase } from '../common'; import type { Awaitable, CamelCase } from '../common';
import type { CallbackEventHandler, CustomEventsKeys, GatewayEvents } from '../events'; import type { CallbackEventHandler, CustomEventsKeys, GatewayEvents } from '../events';
import { error } from 'node:console';
import * as RawEvents from '../events/hooks'; import * as RawEvents from '../events/hooks';
import type { UsingClient } from '../commands';
export type AllClientEvents = CustomEventsKeys | GatewayEvents; export type AllClientEvents = CustomEventsKeys | GatewayEvents;
export type ParseClientEventName<T extends AllClientEvents> = T extends CustomEventsKeys ? T : CamelCase<T>; export type ParseClientEventName<T extends AllClientEvents> = T extends CustomEventsKeys ? T : CamelCase<T>;

View File

@ -1,6 +1,6 @@
import type { APIInteractionResponse, APIInteraction } from '../types';
import { isBufferLike } from '../api/utils/utils'; import { isBufferLike } from '../api/utils/utils';
import type { DeepPartial } from '../common'; import type { DeepPartial } from '../common';
import type { APIInteraction, APIInteractionResponse } from '../types';
import type { BaseClientOptions, StartOptions } from './base'; import type { BaseClientOptions, StartOptions } from './base';
import { BaseClient } from './base'; import { BaseClient } from './base';

View File

@ -1,8 +1,8 @@
import { magicImport, type PermissionStrings } from '../../common'; import { type PermissionStrings, magicImport } from '../../common';
import { import {
ApplicationCommandType, ApplicationCommandType,
type EntryPointCommandHandlerType,
type ApplicationIntegrationType, type ApplicationIntegrationType,
type EntryPointCommandHandlerType,
type InteractionContextType, type InteractionContextType,
type LocaleString, type LocaleString,
} from '../../types'; } from '../../types';

View File

@ -1,5 +1,10 @@
import { MessageFlags } from '../../types';
import type { ReturnCache } from '../..'; import type { ReturnCache } from '../..';
import type {
GuildMemberStructure,
GuildStructure,
MessageStructure,
WebhookMessageStructure,
} from '../../client/transformers';
import type { import type {
InteractionCreateBodyRequest, InteractionCreateBodyRequest,
InteractionMessageUpdateBodyRequest, InteractionMessageUpdateBodyRequest,
@ -8,16 +13,11 @@ import type {
When, When,
} from '../../common'; } from '../../common';
import type { AllChannels, EntryPointInteraction } from '../../structures'; import type { AllChannels, EntryPointInteraction } from '../../structures';
import { MessageFlags } from '../../types';
import { BaseContext } from '../basecontext'; import { BaseContext } from '../basecontext';
import type { RegisteredMiddlewares } from '../decorators'; 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 { EntryPointCommand } from './entryPoint';
import type { CommandMetadata, ExtendContext, GlobalMetadata, UsingClient } from './shared';
export interface EntryPointContext<M extends keyof RegisteredMiddlewares = never> extends BaseContext, ExtendContext {} export interface EntryPointContext<M extends keyof RegisteredMiddlewares = never> extends BaseContext, ExtendContext {}

View File

@ -1,10 +1,10 @@
import { type PermissionStrings, magicImport } from '../../common';
import type { import type {
ApplicationCommandType, ApplicationCommandType,
ApplicationIntegrationType, ApplicationIntegrationType,
InteractionContextType, InteractionContextType,
LocaleString, LocaleString,
} from '../../types'; } from '../../types';
import { magicImport, type PermissionStrings } from '../../common';
import type { RegisteredMiddlewares } from '../decorators'; import type { RegisteredMiddlewares } from '../decorators';
import type { MenuCommandContext } from './menucontext'; import type { MenuCommandContext } from './menucontext';
import type { ExtraProps, UsingClient } from './shared'; import type { ExtraProps, UsingClient } from './shared';

View File

@ -1,17 +1,4 @@
import { type APIMessage, ApplicationCommandType, MessageFlags } from '../../types';
import type { ContextMenuCommand, ReturnCache } from '../..'; 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 { import {
type GuildMemberStructure, type GuildMemberStructure,
type GuildStructure, type GuildStructure,
@ -20,6 +7,19 @@ import {
type UserStructure, type UserStructure,
type WebhookMessageStructure, type WebhookMessageStructure,
} from '../../client/transformers'; } 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; export type InteractionTarget<T> = T extends MessageCommandInteraction ? MessageStructure : UserStructure;

View File

@ -1,5 +1,5 @@
import type { ModalContext } from '../components'; 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 { MessageCommandInteraction, UserCommandInteraction } from '../structures';
import type { CommandContext } from './applications/chatcontext'; import type { CommandContext } from './applications/chatcontext';
import type { MenuCommandContext } from './applications/menucontext'; import type { MenuCommandContext } from './applications/menucontext';

View File

@ -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 { import {
type APIApplicationCommandInteractionDataOption, type APIApplicationCommandInteractionDataOption,
type APIAttachment, type APIAttachment,
@ -8,18 +18,8 @@ import {
type APIUser, type APIUser,
ApplicationCommandOptionType, ApplicationCommandOptionType,
} from '../types'; } from '../types';
import type { MakeRequired } from '../common';
import { channelFrom, type AllChannels } from '../structures';
import type { Command, CommandAutocompleteOption, CommandOption, SubCommand } from './applications/chat'; import type { Command, CommandAutocompleteOption, CommandOption, SubCommand } from './applications/chat';
import type { UsingClient } from './applications/shared'; 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 = { export type ContextOptionsResolved = {
members?: Record<string, APIGuildMember | Omit<APIGuildMember, 'user'> | APIInteractionGuildMember>; members?: Record<string, APIGuildMember | Omit<APIGuildMember, 'user'> | APIInteractionGuildMember>;

View File

@ -1,4 +1,4 @@
import { BaseInteraction, resolveFiles, type ReplyInteractionBody, Modal } from '../..'; import { BaseInteraction, Modal, type ReplyInteractionBody, resolveFiles } from '../..';
import { Transformers } from '../../client/transformers'; import { Transformers } from '../../client/transformers';
import type { InteractionMessageUpdateBodyRequest, MessageWebhookCreateBodyRequest } from '../types/write'; import type { InteractionMessageUpdateBodyRequest, MessageWebhookCreateBodyRequest } from '../types/write';
import { BaseShorter } from './base'; import { BaseShorter } from './base';

View File

@ -1,15 +1,15 @@
import { resolveFiles } from '../../builders';
import { MessagesMethods } from '../../structures';
import type { import type {
RESTPatchAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody,
RESTPostAPIChannelMessageJSONBody, RESTPostAPIChannelMessageJSONBody,
RESTPostAPIChannelMessagesThreadsJSONBody, RESTPostAPIChannelMessagesThreadsJSONBody,
} from '../../types'; } 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 type { ValidAnswerId } from '../../api/Routes/channels';
import { Transformers } from '../../client/transformers'; import { Transformers } from '../../client/transformers';
import type { MessageCreateBodyRequest, MessageUpdateBodyRequest } from '../types/write';
import { BaseShorter } from './base';
export class MessageShorter extends BaseShorter { export class MessageShorter extends BaseShorter {
async write(channelId: string, { files, ...body }: MessageCreateBodyRequest) { async write(channelId: string, { files, ...body }: MessageCreateBodyRequest) {

View File

@ -1,8 +1,8 @@
import type { RESTGetAPIChannelMessageReactionUsersQuery } from '../../types'; import { Transformers, type UserStructure } from '../../client/transformers';
import { encodeEmoji, resolveEmoji } from '../../common/it/utils'; import { encodeEmoji, resolveEmoji } from '../../common/it/utils';
import type { RESTGetAPIChannelMessageReactionUsersQuery } from '../../types';
import type { EmojiResolvable } from '../types/resolvables'; import type { EmojiResolvable } from '../types/resolvables';
import { BaseShorter } from './base'; import { BaseShorter } from './base';
import { Transformers, type UserStructure } from '../../client/transformers';
export class ReactionShorter extends BaseShorter { export class ReactionShorter extends BaseShorter {
async add(messageId: string, channelId: string, emoji: EmojiResolvable): Promise<void> { async add(messageId: string, channelId: string, emoji: EmojiResolvable): Promise<void> {

View File

@ -1,3 +1,4 @@
import { Transformers } from '../../client/transformers';
import type { import type {
APIRole, APIRole,
RESTPatchAPIGuildRoleJSONBody, RESTPatchAPIGuildRoleJSONBody,
@ -5,7 +6,6 @@ import type {
RESTPostAPIGuildRoleJSONBody, RESTPostAPIGuildRoleJSONBody,
} from '../../types'; } from '../../types';
import { BaseShorter } from './base'; import { BaseShorter } from './base';
import { Transformers } from '../../client/transformers';
export class RoleShorter extends BaseShorter { export class RoleShorter extends BaseShorter {
/** /**

View File

@ -1,6 +1,6 @@
import { Transformers } from '../../client/transformers';
import type { RESTPatchAPIGuildTemplateJSONBody, RESTPostAPIGuildTemplatesJSONBody } from '../../types'; import type { RESTPatchAPIGuildTemplateJSONBody, RESTPostAPIGuildTemplatesJSONBody } from '../../types';
import { BaseShorter } from './base'; import { BaseShorter } from './base';
import { Transformers } from '../../client/transformers';
export class TemplateShorter extends BaseShorter { export class TemplateShorter extends BaseShorter {
fetch(code: string) { fetch(code: string) {

View File

@ -1,3 +1,5 @@
import type { ThreadChannelStructure } from '../../client/transformers';
import { channelFrom } from '../../structures';
import type { import type {
APIThreadMember, APIThreadMember,
RESTGetAPIChannelThreadMembersQuery, RESTGetAPIChannelThreadMembersQuery,
@ -7,10 +9,8 @@ import type {
RESTPostAPIChannelThreadsJSONBody, RESTPostAPIChannelThreadsJSONBody,
RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIGuildForumThreadsJSONBody,
} from '../../types'; } from '../../types';
import { BaseShorter } from './base';
import type { MakeRequired, When } from '../types/util'; import type { MakeRequired, When } from '../types/util';
import type { ThreadChannelStructure } from '../../client/transformers'; import { BaseShorter } from './base';
import { channelFrom } from '../../structures';
export class ThreadShorter extends BaseShorter { export class ThreadShorter extends BaseShorter {
/** /**

View File

@ -1,7 +1,7 @@
import type { APIGuildMember, APIPartialEmoji } from '../../types';
import type { EmbedColors } from '..'; import type { EmbedColors } from '..';
import type { Attachment, AttachmentDataType, AttachmentResolvable } from '../../builders'; import type { Attachment, AttachmentDataType, AttachmentResolvable } from '../../builders';
import type { GuildMember } from '../../structures'; import type { GuildMember } from '../../structures';
import type { APIGuildMember, APIPartialEmoji } from '../../types';
export type EmojiResolvable = string | Partial<APIPartialEmoji> | `<${string | undefined}:${string}:${string}>`; export type EmojiResolvable = string | Partial<APIPartialEmoji> | `<${string | undefined}:${string}:${string}>`;
export type GuildMemberResolvable = string | Partial<GuildMember> | APIGuildMember; export type GuildMemberResolvable = string | Partial<GuildMember> | APIGuildMember;

View File

@ -1,3 +1,13 @@
import type { RawFile } from '../../api';
import type {
ActionRow,
Attachment,
AttachmentBuilder,
BuilderComponents,
Embed,
Modal,
PollBuilder,
} from '../../builders';
import type { import type {
APIActionRowComponent, APIActionRowComponent,
APIEmbed, APIEmbed,
@ -11,16 +21,6 @@ import type {
RESTPostAPIChannelMessageJSONBody, RESTPostAPIChannelMessageJSONBody,
RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenJSONBody,
} from '../../types'; } from '../../types';
import type { RawFile } from '../../api';
import type {
ActionRow,
Attachment,
AttachmentBuilder,
BuilderComponents,
Embed,
Modal,
PollBuilder,
} from '../../builders';
import type { OmitInsert } from './util'; import type { OmitInsert } from './util';

View File

@ -1,3 +1,4 @@
import { fromComponent } from '../builders';
import { import {
type APIActionRowComponent, type APIActionRowComponent,
type APIActionRowComponentTypes, type APIActionRowComponentTypes,
@ -10,7 +11,6 @@ import {
type APIUserSelectComponent, type APIUserSelectComponent,
ComponentType, ComponentType,
} from '../types'; } from '../types';
import { fromComponent } from '../builders';
export class BaseComponent<T extends ComponentType> { export class BaseComponent<T extends ComponentType> {
constructor(public data: APIComponentsMap[T]) {} constructor(public data: APIComponentsMap[T]) {}

View File

@ -1,3 +1,4 @@
import { Button } from '../builders';
import type { import type {
APIButtonComponentWithCustomId, APIButtonComponentWithCustomId,
APIButtonComponentWithSKUId, APIButtonComponentWithSKUId,
@ -5,7 +6,6 @@ import type {
ButtonStyle, ButtonStyle,
ComponentType, ComponentType,
} from '../types'; } from '../types';
import { Button } from '../builders';
import { BaseComponent } from './BaseComponent'; import { BaseComponent } from './BaseComponent';
export class LinkButtonComponent extends BaseComponent<ComponentType.Button> { export class LinkButtonComponent extends BaseComponent<ComponentType.Button> {

View File

@ -1,6 +1,6 @@
import { ComponentType } from '../types';
import type { ContextComponentCommandInteractionMap, ComponentContext } from './componentcontext';
import type { ExtraProps, RegisteredMiddlewares, UsingClient } from '../commands'; import type { ExtraProps, RegisteredMiddlewares, UsingClient } from '../commands';
import { ComponentType } from '../types';
import type { ComponentContext, ContextComponentCommandInteractionMap } from './componentcontext';
export const InteractionCommandType = { export const InteractionCommandType = {
COMPONENT: 0, COMPONENT: 0,

View File

@ -1,4 +1,3 @@
import { ComponentType, MessageFlags } from '../types';
import type { import type {
AllChannels, AllChannels,
ButtonInteraction, ButtonInteraction,
@ -10,6 +9,12 @@ import type {
StringSelectMenuInteraction, StringSelectMenuInteraction,
UserSelectMenuInteraction, UserSelectMenuInteraction,
} from '..'; } from '..';
import type {
GuildMemberStructure,
GuildStructure,
MessageStructure,
WebhookMessageStructure,
} from '../client/transformers';
import type { CommandMetadata, ExtendContext, GlobalMetadata, RegisteredMiddlewares, UsingClient } from '../commands'; import type { CommandMetadata, ExtendContext, GlobalMetadata, RegisteredMiddlewares, UsingClient } from '../commands';
import { BaseContext } from '../commands/basecontext'; import { BaseContext } from '../commands/basecontext';
import type { import type {
@ -20,12 +25,7 @@ import type {
UnionToTuple, UnionToTuple,
When, When,
} from '../common'; } from '../common';
import type { import { ComponentType, MessageFlags } from '../types';
GuildMemberStructure,
GuildStructure,
MessageStructure,
WebhookMessageStructure,
} from '../client/transformers';
export interface ComponentContext< export interface ComponentContext<
Type extends keyof ContextComponentCommandInteractionMap = keyof ContextComponentCommandInteractionMap, Type extends keyof ContextComponentCommandInteractionMap = keyof ContextComponentCommandInteractionMap,

View File

@ -1,5 +1,10 @@
import { MessageFlags } from '../types';
import type { AllChannels, ModalCommand, ModalSubmitInteraction, ReturnCache } from '..'; 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 type { CommandMetadata, ExtendContext, GlobalMetadata, RegisteredMiddlewares, UsingClient } from '../commands';
import { BaseContext } from '../commands/basecontext'; import { BaseContext } from '../commands/basecontext';
import type { import type {
@ -9,12 +14,7 @@ import type {
UnionToTuple, UnionToTuple,
When, When,
} from '../common'; } from '../common';
import type { import { MessageFlags } from '../types';
GuildMemberStructure,
GuildStructure,
MessageStructure,
WebhookMessageStructure,
} from '../client/transformers';
export interface ModalContext extends BaseContext, ExtendContext {} export interface ModalContext extends BaseContext, ExtendContext {}

View File

@ -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 { import type {
GatewayDispatchPayload, GatewayDispatchPayload,
GatewayMessageCreateDispatch, GatewayMessageCreateDispatch,
GatewayMessageDeleteBulkDispatch, GatewayMessageDeleteBulkDispatch,
GatewayMessageDeleteDispatch, GatewayMessageDeleteDispatch,
} from '../types'; } from '../types';
import type { Client, WorkerClient } from '../client'; import type { ClientEvent, ClientNameEvents, CustomEvents, CustomEventsKeys, EventContext } from './event';
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';
export type EventValue = MakeRequired<ClientEvent, '__filePath'> & { fired?: boolean }; export type EventValue = MakeRequired<ClientEvent, '__filePath'> & { fired?: boolean };
export type GatewayEvents = Uppercase<SnakeCase<keyof ClientEvents>>; export type GatewayEvents = Uppercase<SnakeCase<keyof ClientEvents>>;

View File

@ -1,6 +1,6 @@
import type { GatewayApplicationCommandPermissionsUpdateDispatchData } from '../../types';
import { toCamelCase } from '../../common';
import type { UsingClient } from '../../commands'; import type { UsingClient } from '../../commands';
import { toCamelCase } from '../../common';
import type { GatewayApplicationCommandPermissionsUpdateDispatchData } from '../../types';
export const APPLICATION_COMMAND_PERMISSIONS_UPDATE = ( export const APPLICATION_COMMAND_PERMISSIONS_UPDATE = (
_self: UsingClient, _self: UsingClient,

View File

@ -1,12 +1,12 @@
import { Transformers } from '../../client/transformers';
import type { UsingClient } from '../../commands';
import { toCamelCase } from '../../common';
import type { import type {
GatewayAutoModerationActionExecutionDispatchData, GatewayAutoModerationActionExecutionDispatchData,
GatewayAutoModerationRuleCreateDispatchData, GatewayAutoModerationRuleCreateDispatchData,
GatewayAutoModerationRuleDeleteDispatchData, GatewayAutoModerationRuleDeleteDispatchData,
GatewayAutoModerationRuleUpdateDispatchData, GatewayAutoModerationRuleUpdateDispatchData,
} from '../../types'; } from '../../types';
import { toCamelCase } from '../../common';
import type { UsingClient } from '../../commands';
import { Transformers } from '../../client/transformers';
export const AUTO_MODERATION_ACTION_EXECUTION = ( export const AUTO_MODERATION_ACTION_EXECUTION = (
_self: UsingClient, _self: UsingClient,

View File

@ -5,9 +5,9 @@ import type {
GatewayChannelUpdateDispatchData, GatewayChannelUpdateDispatchData,
} from '../../types'; } from '../../types';
import { toCamelCase } from '../../common';
import { channelFrom, type AllChannels } from '../../structures';
import type { UsingClient } from '../../commands'; import type { UsingClient } from '../../commands';
import { toCamelCase } from '../../common';
import { type AllChannels, channelFrom } from '../../structures';
export const CHANNEL_CREATE = (self: UsingClient, data: GatewayChannelCreateDispatchData) => { export const CHANNEL_CREATE = (self: UsingClient, data: GatewayChannelCreateDispatchData) => {
return channelFrom(data, self); return channelFrom(data, self);

View File

@ -1,6 +1,6 @@
import type { GatewayDispatchPayload, GatewayReadyDispatchData, GatewayResumedDispatch } from '../../types';
import type { UsingClient } from '../../commands';
import { Transformers } from '../../client/transformers'; import { Transformers } from '../../client/transformers';
import type { UsingClient } from '../../commands';
import type { GatewayDispatchPayload, GatewayReadyDispatchData, GatewayResumedDispatch } from '../../types';
export const READY = (self: UsingClient, data: GatewayReadyDispatchData) => { export const READY = (self: UsingClient, data: GatewayReadyDispatchData) => {
return Transformers.ClientUser(self, data.user, data.application); return Transformers.ClientUser(self, data.user, data.application);

View File

@ -1,6 +1,6 @@
import type { APIEntitlement } from '../../types';
import type { UsingClient } from '../../commands'; import type { UsingClient } from '../../commands';
import { Entitlement } from '../../structures/Entitlement'; import { Entitlement } from '../../structures/Entitlement';
import type { APIEntitlement } from '../../types';
export const ENTITLEMENT_CREATE = (client: UsingClient, data: APIEntitlement) => { export const ENTITLEMENT_CREATE = (client: UsingClient, data: APIEntitlement) => {
return new Entitlement(client, data); return new Entitlement(client, data);

View File

@ -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 { import type {
GatewayGuildAuditLogEntryCreateDispatchData, GatewayGuildAuditLogEntryCreateDispatchData,
GatewayGuildBanAddDispatchData, GatewayGuildBanAddDispatchData,
@ -21,14 +29,6 @@ import type {
GatewayGuildStickersUpdateDispatchData, GatewayGuildStickersUpdateDispatchData,
GatewayGuildUpdateDispatchData, GatewayGuildUpdateDispatchData,
} from '../../types'; } 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) => { export const GUILD_AUDIT_LOG_ENTRY_CREATE = (_self: UsingClient, data: GatewayGuildAuditLogEntryCreateDispatchData) => {
return toCamelCase(data); return toCamelCase(data);

View File

@ -1,11 +1,11 @@
import { Transformers } from '../../client/transformers';
import type { UsingClient } from '../../commands';
import { toCamelCase } from '../../common';
import type { import type {
GatewayIntegrationCreateDispatchData, GatewayIntegrationCreateDispatchData,
GatewayIntegrationDeleteDispatchData, GatewayIntegrationDeleteDispatchData,
GatewayIntegrationUpdateDispatchData, GatewayIntegrationUpdateDispatchData,
} from '../../types'; } from '../../types';
import { toCamelCase } from '../../common';
import type { UsingClient } from '../../commands';
import { Transformers } from '../../client/transformers';
export const INTEGRATION_CREATE = (self: UsingClient, data: GatewayIntegrationCreateDispatchData) => { export const INTEGRATION_CREATE = (self: UsingClient, data: GatewayIntegrationCreateDispatchData) => {
return data.user return data.user

View File

@ -1,6 +1,6 @@
import type { GatewayInteractionCreateDispatchData } from '../../types';
import { BaseInteraction } from '../../structures';
import type { UsingClient } from '../../commands'; import type { UsingClient } from '../../commands';
import { BaseInteraction } from '../../structures';
import type { GatewayInteractionCreateDispatchData } from '../../types';
export const INTERACTION_CREATE = (self: UsingClient, data: GatewayInteractionCreateDispatchData) => { export const INTERACTION_CREATE = (self: UsingClient, data: GatewayInteractionCreateDispatchData) => {
return BaseInteraction.from(self, data); return BaseInteraction.from(self, data);

View File

@ -1,6 +1,6 @@
import type { GatewayInviteCreateDispatchData, GatewayInviteDeleteDispatchData } from '../../types';
import type { UsingClient } from '../../commands'; import type { UsingClient } from '../../commands';
import { toCamelCase } from '../../common'; import { toCamelCase } from '../../common';
import type { GatewayInviteCreateDispatchData, GatewayInviteDeleteDispatchData } from '../../types';
export const INVITE_CREATE = (_self: UsingClient, data: GatewayInviteCreateDispatchData) => { export const INVITE_CREATE = (_self: UsingClient, data: GatewayInviteCreateDispatchData) => {
return toCamelCase(data); return toCamelCase(data);

View File

@ -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 { import type {
GatewayMessageCreateDispatchData, GatewayMessageCreateDispatchData,
GatewayMessageDeleteBulkDispatchData, GatewayMessageDeleteBulkDispatchData,
@ -9,9 +12,6 @@ import type {
GatewayMessageReactionRemoveEmojiDispatchData, GatewayMessageReactionRemoveEmojiDispatchData,
GatewayMessageUpdateDispatchData, GatewayMessageUpdateDispatchData,
} from '../../types'; } 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) => { export const MESSAGE_CREATE = (self: UsingClient, data: GatewayMessageCreateDispatchData) => {
return Transformers.Message(self, data); return Transformers.Message(self, data);

View File

@ -1,6 +1,6 @@
import type { GatewayPresenceUpdateDispatchData } from '../../types';
import type { UsingClient } from '../../commands'; import type { UsingClient } from '../../commands';
import { toCamelCase } from '../../common'; import { toCamelCase } from '../../common';
import type { GatewayPresenceUpdateDispatchData } from '../../types';
export const PRESENCE_UPDATE = async (self: UsingClient, data: GatewayPresenceUpdateDispatchData) => { export const PRESENCE_UPDATE = async (self: UsingClient, data: GatewayPresenceUpdateDispatchData) => {
return [toCamelCase(data), await self.cache.presences?.get(data.user.id)] as const; return [toCamelCase(data), await self.cache.presences?.get(data.user.id)] as const;

View File

@ -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 { import type {
GatewayStageInstanceCreateDispatchData, GatewayStageInstanceCreateDispatchData,
GatewayStageInstanceDeleteDispatchData, GatewayStageInstanceDeleteDispatchData,
GatewayStageInstanceUpdateDispatchData, GatewayStageInstanceUpdateDispatchData,
} from '../../types'; } 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) => { export const STAGE_INSTANCE_CREATE = (_self: UsingClient, data: GatewayStageInstanceCreateDispatchData) => {
return toCamelCase(data); return toCamelCase(data);

View File

@ -1,3 +1,6 @@
import { type ThreadChannelStructure, Transformers } from '../../client/transformers';
import type { UsingClient } from '../../commands';
import { toCamelCase } from '../../common';
import type { import type {
GatewayThreadCreateDispatchData, GatewayThreadCreateDispatchData,
GatewayThreadDeleteDispatchData, GatewayThreadDeleteDispatchData,
@ -6,9 +9,6 @@ import type {
GatewayThreadMembersUpdateDispatchData, GatewayThreadMembersUpdateDispatchData,
GatewayThreadUpdateDispatchData, GatewayThreadUpdateDispatchData,
} from '../../types'; } 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) => { export const THREAD_CREATE = (self: UsingClient, data: GatewayThreadCreateDispatchData) => {
return Transformers.ThreadChannel(self, data); return Transformers.ThreadChannel(self, data);

View File

@ -1,7 +1,7 @@
import type { GatewayTypingStartDispatchData } from '../../types';
import { toCamelCase } from '../../common';
import type { UsingClient } from '../../commands';
import { Transformers } from '../../client/transformers'; 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) => { export const TYPING_START = (self: UsingClient, data: GatewayTypingStartDispatchData) => {
return data.member return data.member

View File

@ -1,6 +1,6 @@
import type { GatewayUserUpdateDispatchData } from '../../types';
import type { UsingClient } from '../../commands';
import { Transformers, type UserStructure } from '../../client/transformers'; import { Transformers, type UserStructure } from '../../client/transformers';
import type { UsingClient } from '../../commands';
import type { GatewayUserUpdateDispatchData } from '../../types';
export const USER_UPDATE = async ( export const USER_UPDATE = async (
self: UsingClient, self: UsingClient,

View File

@ -1,11 +1,11 @@
import { Transformers, type VoiceStateStructure } from '../../client/transformers';
import type { UsingClient } from '../../commands';
import { toCamelCase } from '../../common';
import type { import type {
GatewayVoiceChannelEffectSendDispachData, GatewayVoiceChannelEffectSendDispachData,
GatewayVoiceServerUpdateDispatchData, GatewayVoiceServerUpdateDispatchData,
GatewayVoiceStateUpdateDispatchData, GatewayVoiceStateUpdateDispatchData,
} from '../../types'; } 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) => { export const VOICE_SERVER_UPDATE = (_self: UsingClient, data: GatewayVoiceServerUpdateDispatchData) => {
return toCamelCase(data); return toCamelCase(data);

View File

@ -1,6 +1,6 @@
import type { GatewayWebhooksUpdateDispatchData } from '../../types';
import { toCamelCase } from '../../common';
import type { UsingClient } from '../../commands'; import type { UsingClient } from '../../commands';
import { toCamelCase } from '../../common';
import type { GatewayWebhooksUpdateDispatchData } from '../../types';
export const WEBHOOKS_UPDATE = (_self: UsingClient, data: GatewayWebhooksUpdateDispatchData) => { export const WEBHOOKS_UPDATE = (_self: UsingClient, data: GatewayWebhooksUpdateDispatchData) => {
return toCamelCase(data); return toCamelCase(data);

View File

@ -1,7 +1,7 @@
import { BaseHandler, isCloudfareWorker, magicImport } from '../common';
import { LangRouter } from './router';
import type { FileLoaded } from '../commands/handler'; 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 { export class LangsHandler extends BaseHandler {
values: Partial<Record<string, any>> = {}; values: Partial<Record<string, any>> = {};

View File

@ -1,6 +1,8 @@
import type { UsingClient } from '../commands'; import type { UsingClient } from '../commands';
import type { ObjectToLower, StructPropState, StructStates, ToClass } from '../common/types/util'; import type { ObjectToLower, StructPropState, StructStates, ToClass } from '../common/types/util';
import type { APIGuild, APIPartialGuild, GatewayGuildCreateDispatchData, RESTPatchAPIGuildJSONBody } from '../types';
import { AutoModerationRule } from './AutoModerationRule'; import { AutoModerationRule } from './AutoModerationRule';
import { GuildBan } from './GuildBan';
import { GuildEmoji } from './GuildEmoji'; import { GuildEmoji } from './GuildEmoji';
import { GuildMember } from './GuildMember'; import { GuildMember } from './GuildMember';
import { GuildRole } from './GuildRole'; import { GuildRole } from './GuildRole';
@ -9,8 +11,6 @@ import { Sticker } from './Sticker';
import { BaseChannel, WebhookGuildMethods } from './channels'; import { BaseChannel, WebhookGuildMethods } from './channels';
import { BaseGuild } from './extra/BaseGuild'; import { BaseGuild } from './extra/BaseGuild';
import type { DiscordBase } from './extra/DiscordBase'; 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 interface Guild extends ObjectToLower<Omit<APIGuild, 'stickers' | 'emojis' | 'roles'>>, DiscordBase {}
export class Guild<State extends StructStates = 'api'> extends (BaseGuild as unknown as ToClass< export class Guild<State extends StructStates = 'api'> extends (BaseGuild as unknown as ToClass<

View File

@ -1,8 +1,8 @@
import type { UsingClient } from '../commands'; import type { UsingClient } from '../commands';
import { Formatter, type MethodContext, type ObjectToLower } from '../common'; import { Formatter, type MethodContext, type ObjectToLower } from '../common';
import { DiscordBase } from './extra/DiscordBase';
import type { BanShorter } from '../common/shorters/bans'; import type { BanShorter } from '../common/shorters/bans';
import type { APIBan, RESTGetAPIGuildBansQuery } from '../types'; import type { APIBan, RESTGetAPIGuildBansQuery } from '../types';
import { DiscordBase } from './extra/DiscordBase';
export interface GuildBan extends DiscordBase, ObjectToLower<Omit<APIBan, 'id'>> {} export interface GuildBan extends DiscordBase, ObjectToLower<Omit<APIBan, 'id'>> {}

View File

@ -1,6 +1,6 @@
import type { BaseCDNUrlOptions } from '../api'; import type { BaseCDNUrlOptions } from '../api';
import type { UsingClient } from '../commands'; 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 type { APIEmoji, RESTPatchAPIChannelJSONBody, RESTPatchAPIGuildEmojiJSONBody } from '../types';
import { DiscordBase } from './extra/DiscordBase'; import { DiscordBase } from './extra/DiscordBase';

View File

@ -7,30 +7,30 @@ export type GuildMemberData =
| GatewayGuildMemberAddDispatchData | GatewayGuildMemberAddDispatchData
| APIInteractionDataResolvedGuildMember; | APIInteractionDataResolvedGuildMember;
import type { import { Transformers, type UserStructure } from '../client/transformers';
APIGuildMember,
GatewayGuildMemberUpdateDispatchData,
GatewayGuildMemberAddDispatchData,
APIInteractionDataResolvedGuildMember,
RESTPutAPIGuildBanJSONBody,
RESTPatchAPIGuildMemberJSONBody,
RESTGetAPIGuildMembersSearchQuery,
RESTPutAPIGuildMemberJSONBody,
RESTGetAPIGuildMembersQuery,
APIUser,
} from '../types';
import type { UsingClient } from '../commands'; import type { UsingClient } from '../commands';
import { PermissionsBitField } from './extra/Permissions';
import { import {
Formatter, Formatter,
type GuildMemberResolvable,
type ImageOptions,
type MessageCreateBodyRequest, type MessageCreateBodyRequest,
type MethodContext,
type ObjectToLower, type ObjectToLower,
type ToClass, type ToClass,
type ImageOptions,
type MethodContext,
type GuildMemberResolvable,
} from '../common'; } 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 interface BaseGuildMember extends DiscordBase, ObjectToLower<Omit<APIGuildMember, 'user' | 'roles'>> {}
export class BaseGuildMember extends DiscordBase { export class BaseGuildMember extends DiscordBase {

View File

@ -1,11 +1,11 @@
import type { UsingClient } from '../commands';
import { Formatter, type MethodContext, type ObjectToLower } from '../common';
import type { import type {
APIRole, APIRole,
RESTPatchAPIGuildRoleJSONBody, RESTPatchAPIGuildRoleJSONBody,
RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsJSONBody,
RESTPostAPIGuildRoleJSONBody, RESTPostAPIGuildRoleJSONBody,
} from '../types'; } from '../types';
import type { UsingClient } from '../commands';
import { Formatter, type MethodContext, type ObjectToLower } from '../common';
import { DiscordBase } from './extra/DiscordBase'; import { DiscordBase } from './extra/DiscordBase';
import { PermissionsBitField } from './extra/Permissions'; import { PermissionsBitField } from './extra/Permissions';

View File

@ -1,6 +1,6 @@
import type { APITemplate, RESTPatchAPIGuildTemplateJSONBody, RESTPostAPIGuildTemplatesJSONBody } from '../types';
import type { UsingClient } from '../commands'; import type { UsingClient } from '../commands';
import type { MethodContext, ObjectToLower } from '../common'; import type { MethodContext, ObjectToLower } from '../common';
import type { APITemplate, RESTPatchAPIGuildTemplateJSONBody, RESTPostAPIGuildTemplatesJSONBody } from '../types';
import { Base } from './extra/Base'; import { Base } from './extra/Base';
export interface GuildTemplate extends Base, ObjectToLower<APITemplate> {} export interface GuildTemplate extends Base, ObjectToLower<APITemplate> {}

View File

@ -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 { import type {
APIChannelMention, APIChannelMention,
APIEmbed, APIEmbed,
@ -6,23 +21,8 @@ import type {
APIUser, APIUser,
GatewayMessageCreateDispatchData, GatewayMessageCreateDispatchData,
} from '../types'; } 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 type { MessageWebhookMethodEditParams, MessageWebhookMethodWriteParams } from './Webhook';
import { DiscordBase } from './extra/DiscordBase'; 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; export type MessageData = APIMessage | GatewayMessageCreateDispatchData;

View File

@ -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 { 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> {} export interface Poll extends ObjectToLower<APIPoll> {}

View File

@ -1,9 +1,9 @@
import type { APISticker, RESTPatchAPIGuildStickerJSONBody, RESTPostAPIGuildStickerFormDataBody } from '../types';
import type { RawFile, UsingClient } from '..'; import type { RawFile, UsingClient } from '..';
import type { Attachment, AttachmentBuilder } from '../builders'; 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 { 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'>> {} export interface Sticker extends DiscordBase, ObjectToLower<Omit<APISticker, 'user'>> {}

View File

@ -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. * Represents a Discord webhook.
*/ */
@ -8,17 +18,7 @@ import type {
RESTPatchAPIWebhookWithTokenJSONBody, RESTPatchAPIWebhookWithTokenJSONBody,
RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenQuery,
} from '../types'; } from '../types';
import type { UsingClient } from '../commands';
import type {
ImageOptions,
MessageWebhookCreateBodyRequest,
MessageWebhookPayload,
MessageWebhookUpdateBodyRequest,
MethodContext,
ObjectToLower,
} from '../common';
import { DiscordBase } from './extra/DiscordBase'; 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'>> {} export interface Webhook extends DiscordBase, ObjectToLower<Omit<APIWebhook, 'user' | 'source_guild'>> {}

View File

@ -1,5 +1,5 @@
import type { WorkerClient } from '../..'; 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 { ImageOptions } from '../../common/types/options';
import { type APIPartialGuild, GuildFeature } from '../../types'; import { type APIPartialGuild, GuildFeature } from '../../types';
import type { ShardManager } from '../../websocket'; import type { ShardManager } from '../../websocket';

View File

@ -1,6 +1,6 @@
import type { UsingClient } from '../../commands'; import type { UsingClient } from '../../commands';
import { Base } from './Base';
import { snowflakeToTimestamp } from '../../common/it/utils'; import { snowflakeToTimestamp } from '../../common/it/utils';
import { Base } from './Base';
export class DiscordBase<Data extends Record<string, any> = { id: string }> extends Base { export class DiscordBase<Data extends Record<string, any> = { id: string }> extends Base {
id: string; id: string;

View File

@ -1,39 +1,39 @@
// https://github.com/discordjs/discord-api-types/blob/main/gateway/v10.ts // 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 { GatewayPresenceUpdate } from './payloads/gateway';
import type { import type {
APIApplication, APIApplication,
APIApplicationCommandPermission, APIApplicationCommandPermission,
APIAutoModerationRule, APIAuditLogEntry,
APIAutoModerationAction, APIAutoModerationAction,
APIAutoModerationRule,
APIChannel, APIChannel,
APIEmoji, APIEmoji,
APIEntitlement,
APIGuild, APIGuild,
APIGuildIntegration, APIGuildIntegration,
APIGuildMember, APIGuildMember,
APIGuildScheduledEvent, APIGuildScheduledEvent,
APIInteraction, APIInteraction,
APIMessage, APIMessage,
APIPartialEmoji,
APIRole, APIRole,
APIStageInstance, APIStageInstance,
APISticker, APISticker,
APISubscription,
APIThreadChannel, APIThreadChannel,
APIThreadMember, APIThreadMember,
APIUnavailableGuild, APIUnavailableGuild,
APIUser, APIUser,
APIVoiceState,
AutoModerationRuleTriggerType,
GatewayActivity, GatewayActivity,
InviteTargetType,
PresenceUpdateStatus,
GatewayPresenceUpdate as RawGatewayPresenceUpdate, GatewayPresenceUpdate as RawGatewayPresenceUpdate,
GatewayThreadListSync as RawGatewayThreadListSync, GatewayThreadListSync as RawGatewayThreadListSync,
GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate, GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate,
APIVoiceState,
InviteTargetType,
PresenceUpdateStatus,
AutoModerationRuleTriggerType,
APIAuditLogEntry,
APIEntitlement,
APIPartialEmoji,
APISubscription,
} from './payloads/index'; } from './payloads/index';
import type { ReactionType } from './rest/index'; import type { ReactionType } from './rest/index';
import type { AnimationTypes, Nullable } from './utils'; import type { AnimationTypes, Nullable } from './utils';

View File

@ -1,4 +1,4 @@
import type { InteractionContextType, ApplicationIntegrationType } from '..'; import type { ApplicationIntegrationType, InteractionContextType } from '..';
import type { ChannelType, Snowflake } from '../..'; import type { ChannelType, Snowflake } from '../..';
import type { LocaleString } from '../../rest'; import type { LocaleString } from '../../rest';

View File

@ -2,7 +2,7 @@
* Types extracted from https://discord.com/developers/docs/resources/channel * 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 { APIApplication } from './application';
import type { APIPartialEmoji } from './emoji'; import type { APIPartialEmoji } from './emoji';
import type { APIGuildMember } from './guild'; import type { APIGuildMember } from './guild';

View File

@ -2,7 +2,7 @@
* Types extracted from https://discord.com/developers/docs/resources/guild * 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 { APIEmoji, APIPartialEmoji } from './emoji';
import type { PresenceUpdateReceiveStatus } from './gateway'; import type { PresenceUpdateReceiveStatus } from './gateway';
import type { OAuth2Scopes } from './oauth2'; import type { OAuth2Scopes } from './oauth2';

View File

@ -1,6 +1,6 @@
import type { APIApplicationRoleConnectionMetadata, APIApplication, APIEmoji } from '../payloads'; import type { APIApplication, APIApplicationRoleConnectionMetadata, APIEmoji } from '../payloads';
import type { StrictPartial, Nullable } from '../utils'; import type { Nullable, StrictPartial } from '../utils';
import type { RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody } from './emoji'; import type { RESTPatchAPIGuildEmojiJSONBody, RESTPostAPIGuildEmojiJSONBody } from './emoji';
/** /**
* https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records * https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records

View File

@ -1,5 +1,5 @@
import type { Snowflake } from '..'; 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 * https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log

View File

@ -1,28 +1,28 @@
import type { Snowflake, ChannelType, VideoQualityMode, OverwriteType, Permissions } from '..'; import type { ChannelType, OverwriteType, Permissions, Snowflake, VideoQualityMode } from '..';
import type { import type {
APIChannel,
ThreadAutoArchiveDuration,
ChannelFlags,
APIGuildForumTag,
APIGuildForumDefaultReactionEmoji,
SortOrderType,
ForumLayoutType,
APIMessage,
APIMessageReference,
APIEmbed,
APIAllowedMentions,
APIActionRowComponent, APIActionRowComponent,
APIMessageActionRowComponent, APIAllowedMentions,
MessageFlags,
APIUser,
APIExtendedInvite,
InviteTargetType,
APIFollowedChannel,
ThreadChannelType,
APIThreadMember,
APIThreadList,
APIAttachment, APIAttachment,
APIChannel,
APIEmbed,
APIExtendedInvite,
APIFollowedChannel,
APIGuildForumDefaultReactionEmoji,
APIGuildForumTag,
APIMessage,
APIMessageActionRowComponent,
APIMessageReference,
APIThreadList,
APIThreadMember,
APIUser,
ChannelFlags,
ForumLayoutType,
InviteTargetType,
MessageFlags,
SortOrderType,
ThreadAutoArchiveDuration,
ThreadChannelType,
} from '../payloads'; } from '../payloads';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../utils'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../utils';
import type { RESTAPIPollCreate } from './poll'; import type { RESTAPIPollCreate } from './poll';

View File

@ -1,39 +1,39 @@
import type { Snowflake } from '..'; import type { Snowflake } from '..';
import type { import type {
APIBan,
APIChannel, APIChannel,
APIDMChannel, APIDMChannel,
APIGroupDMChannel,
GuildVerificationLevel,
GuildDefaultMessageNotifications,
GuildExplicitContentFilter,
GuildSystemChannelFlags,
APIGuild,
GuildMFALevel,
APIGuildPreview,
GuildFeature,
APIThreadList,
APIGuildMember,
APIBan,
APIRole,
APIVoiceRegion,
APIExtendedInvite, APIExtendedInvite,
APIGroupDMChannel,
APIGuild,
APIGuildIntegration, APIGuildIntegration,
APIGuildWidgetSettings, APIGuildMember,
APIGuildWidget,
GuildWidgetStyle,
APIGuildMembershipScreening, APIGuildMembershipScreening,
APIGuildWelcomeScreen,
APIGuildOnboarding, APIGuildOnboarding,
APIGuildOnboardingPrompt, APIGuildOnboardingPrompt,
APIGuildOnboardingPromptOption, APIGuildOnboardingPromptOption,
APIGuildPreview,
APIGuildWelcomeScreen,
APIGuildWidget,
APIGuildWidgetSettings,
APIRole,
APIThreadList,
APIVoiceRegion,
GuildDefaultMessageNotifications,
GuildExplicitContentFilter,
GuildFeature,
GuildMFALevel,
GuildSystemChannelFlags,
GuildVerificationLevel,
GuildWidgetStyle,
} from '../payloads'; } from '../payloads';
import type { import type {
StrictPartial,
DistributivePick,
DistributiveOmit,
StrictRequired,
Nullable,
AddUndefinedToPossiblyUndefinedPropertiesOfInterface, AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
DistributiveOmit,
DistributivePick,
Nullable,
StrictPartial,
StrictRequired,
} from '../utils'; } from '../utils';
import type { RESTPutAPIChannelPermissionJSONBody } from './channel'; import type { RESTPutAPIChannelPermissionJSONBody } from './channel';

View File

@ -1,11 +1,11 @@
import type { Snowflake } from '..'; import type { Snowflake } from '..';
import type { import type {
APIGuildScheduledEvent, APIGuildScheduledEvent,
GuildScheduledEventPrivacyLevel,
GuildScheduledEventEntityType,
APIGuildScheduledEventEntityMetadata, APIGuildScheduledEventEntityMetadata,
GuildScheduledEventStatus,
APIGuildScheduledEventUser, APIGuildScheduledEventUser,
GuildScheduledEventEntityType,
GuildScheduledEventPrivacyLevel,
GuildScheduledEventStatus,
} from '../payloads'; } from '../payloads';
import type { StrictPartial } from '../utils'; import type { StrictPartial } from '../utils';

View File

@ -1,5 +1,5 @@
import type { Snowflake } from '..'; 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 * https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information

View File

@ -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 * https://discord.com/developers/docs/resources/poll#get-answer-voters

View File

@ -1,5 +1,5 @@
import type { Snowflake } from '..'; 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 * https://discord.com/developers/docs/resources/stage-instance#create-stage-instance

View File

@ -1,4 +1,4 @@
import type { APITemplate, APIGuild } from '../payloads'; import type { APIGuild, APITemplate } from '../payloads';
import type { StrictPartial } from '../utils'; import type { StrictPartial } from '../utils';
/** /**

View File

@ -1,11 +1,11 @@
import type { Snowflake } from '..'; import type { Snowflake } from '..';
import type { import type {
APIUser, APIApplicationRoleConnection,
APIGuildMember,
GuildFeature,
APIChannel, APIChannel,
APIConnection, APIConnection,
APIApplicationRoleConnection, APIGuildMember,
APIUser,
GuildFeature,
} from '../payloads'; } from '../payloads';
/** /**

View File

@ -1,12 +1,12 @@
import type { Snowflake } from '..'; import type { Snowflake } from '..';
import type { import type {
APIWebhook,
APIEmbed,
APIAllowedMentions,
APIActionRowComponent, APIActionRowComponent,
APIMessageActionRowComponent, APIAllowedMentions,
MessageFlags, APIEmbed,
APIMessage, APIMessage,
APIMessageActionRowComponent,
APIWebhook,
MessageFlags,
} from '../payloads'; } from '../payloads';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../utils'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../utils';
import type { RESTAPIAttachment } from './channel'; import type { RESTAPIAttachment } from './channel';

View File

@ -1,66 +1,66 @@
import type { RestToKeys } from '../common'; import type { RestToKeys } from '../common';
import type { import type {
GatewayActivity,
PresenceUpdateStatus,
GatewayPresenceUpdateData,
GatewayRequestGuildMembersDataWithQuery,
GatewayRequestGuildMembersDataWithUserIds,
APIGuildMember,
APIUser,
GatewayReadyDispatchData,
GatewayChannelUpdateDispatchData,
GatewayAutoModerationActionExecutionDispatchData,
GatewayThreadCreateDispatchData,
GatewayThreadDeleteDispatchData,
GatewayThreadListSyncDispatchData,
GatewayThreadMemberUpdateDispatchData,
GatewayThreadMembersUpdateDispatchData,
GatewayChannelPinsUpdateDispatchData,
GatewayGuildCreateDispatchData,
APIGuild,
GatewayGuildDeleteDispatchData,
APIAuditLogEntry, APIAuditLogEntry,
APIAutoModerationRule,
APIChannel,
APIEntitlement,
APIGuild,
APIGuildMember,
APIGuildScheduledEvent,
APIStageInstance,
APISubscription,
APIUser,
GatewayActivity,
GatewayAutoModerationActionExecutionDispatchData,
GatewayChannelPinsUpdateDispatchData,
GatewayChannelUpdateDispatchData,
GatewayEntitlementCreateDispatchData,
GatewayGuildBanAddDispatchData, GatewayGuildBanAddDispatchData,
GatewayGuildBanRemoveDispatchData, GatewayGuildBanRemoveDispatchData,
GatewayGuildCreateDispatchData,
GatewayGuildDeleteDispatchData,
GatewayGuildEmojisUpdateDispatchData, GatewayGuildEmojisUpdateDispatchData,
GatewayGuildStickersUpdateDispatchData,
GatewayGuildIntegrationsUpdateDispatchData, GatewayGuildIntegrationsUpdateDispatchData,
GatewayGuildMemberAddDispatchData, GatewayGuildMemberAddDispatchData,
GatewayGuildMemberRemoveDispatchData, GatewayGuildMemberRemoveDispatchData,
GatewayGuildMemberUpdateDispatchData, GatewayGuildMemberUpdateDispatchData,
GatewayGuildMembersChunkDispatchData, GatewayGuildMembersChunkDispatchData,
GatewayGuildRoleCreateDispatchData, GatewayGuildRoleCreateDispatchData,
GatewayGuildRoleUpdateDispatchData,
GatewayGuildRoleDeleteDispatchData, GatewayGuildRoleDeleteDispatchData,
GatewayGuildRoleUpdateDispatchData,
GatewayGuildScheduledEventUserRemoveDispatchData,
GatewayGuildStickersUpdateDispatchData,
GatewayIntegrationCreateDispatchData,
GatewayIntegrationDeleteDispatchData, GatewayIntegrationDeleteDispatchData,
GatewayInteractionCreateDispatchData,
GatewayInviteCreateDispatchData, GatewayInviteCreateDispatchData,
GatewayInviteDeleteDispatchData, GatewayInviteDeleteDispatchData,
GatewayMessageCreateDispatchData, GatewayMessageCreateDispatchData,
GatewayMessageUpdateDispatchData,
GatewayMessageDeleteDispatchData,
GatewayMessageDeleteBulkDispatchData, GatewayMessageDeleteBulkDispatchData,
GatewayMessageDeleteDispatchData,
GatewayMessagePollVoteDispatchData,
GatewayMessageReactionAddDispatchData, GatewayMessageReactionAddDispatchData,
GatewayMessageReactionRemoveDispatchData,
GatewayMessageReactionRemoveAllDispatchData, GatewayMessageReactionRemoveAllDispatchData,
GatewayMessageReactionRemoveDispatchData,
GatewayMessageReactionRemoveEmojiDispatchData, GatewayMessageReactionRemoveEmojiDispatchData,
GatewayMessageUpdateDispatchData,
GatewayPresenceUpdateData,
GatewayPresenceUpdateDispatchData, GatewayPresenceUpdateDispatchData,
GatewayReadyDispatchData,
GatewayRequestGuildMembersDataWithQuery,
GatewayRequestGuildMembersDataWithUserIds,
GatewayThreadCreateDispatchData,
GatewayThreadDeleteDispatchData,
GatewayThreadListSyncDispatchData,
GatewayThreadMemberUpdateDispatchData,
GatewayThreadMembersUpdateDispatchData,
GatewayTypingStartDispatchData, GatewayTypingStartDispatchData,
GatewayUserUpdateDispatchData, GatewayUserUpdateDispatchData,
GatewayVoiceStateUpdateData,
GatewayVoiceServerUpdateDispatchData,
GatewayWebhooksUpdateDispatchData,
GatewayInteractionCreateDispatchData,
APIStageInstance,
GatewayMessagePollVoteDispatchData,
GatewayIntegrationCreateDispatchData,
GatewayGuildScheduledEventUserRemoveDispatchData,
APIGuildScheduledEvent,
APIChannel,
APIAutoModerationRule,
APIEntitlement,
GatewayVoiceChannelEffectSendDispachData, GatewayVoiceChannelEffectSendDispachData,
APISubscription, GatewayVoiceServerUpdateDispatchData,
GatewayEntitlementCreateDispatchData, GatewayVoiceStateUpdateData,
GatewayWebhooksUpdateDispatchData,
PresenceUpdateStatus,
} from '../types'; } from '../types';
import { GatewayDispatchEvents } from '../types'; import { GatewayDispatchEvents } from '../types';

View File

@ -1,4 +1,4 @@
import { delay, type Logger } from '../../common'; import { type Logger, delay } from '../../common';
/** /**
* options of the dynamic bucket * options of the dynamic bucket