mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 20:46:08 +00:00
fix: remove deprecated things & decoration route & interaction type (#314)
* fix: remove deprecated things & decoration route & interaction type * fix: meh
This commit is contained in:
parent
62aa27bb83
commit
00d5dcdaa7
@ -10,8 +10,8 @@ export interface CDNRoute {
|
||||
avatars(id: string): {
|
||||
get(hash: string, options?: CDNUrlOptions): string;
|
||||
};
|
||||
'avatar-decorations'(userId: string): {
|
||||
get(hash: string, options?: BaseCDNUrlOptions): string;
|
||||
'avatar-decoration-presets'(asset: string): {
|
||||
get(options?: BaseCDNUrlOptions): string;
|
||||
};
|
||||
'channel-icons'(channelId: string): {
|
||||
get(hash: string, options?: BaseCDNUrlOptions): string;
|
||||
|
@ -146,7 +146,7 @@ export class CommandContext<
|
||||
channel(mode?: 'rest' | 'flow'): Promise<If<InferWithPrefix, AllChannels | undefined, AllChannels>>;
|
||||
channel(mode: 'cache'): ReturnCache<If<InferWithPrefix, AllChannels | undefined, AllChannels>>;
|
||||
channel(mode: 'cache' | 'rest' | 'flow' = 'flow') {
|
||||
if (this.interaction?.channel && mode === 'cache')
|
||||
if (this.interaction && mode === 'cache')
|
||||
return this.client.cache.adapter.isAsync ? Promise.resolve(this.interaction.channel) : this.interaction.channel;
|
||||
switch (mode) {
|
||||
case 'cache':
|
||||
@ -200,7 +200,7 @@ export class CommandContext<
|
||||
}
|
||||
|
||||
get channelId() {
|
||||
return this.interaction?.channelId || (this.message! as MessageStructure).channelId;
|
||||
return this.interaction?.channel.id || (this.message! as MessageStructure).channelId;
|
||||
}
|
||||
|
||||
get author(): UserStructure {
|
||||
|
@ -122,7 +122,7 @@ export class EntryPointContext<M extends keyof RegisteredMiddlewares = never> ex
|
||||
}
|
||||
|
||||
get channelId() {
|
||||
return this.interaction.channelId!;
|
||||
return this.interaction.channel.id;
|
||||
}
|
||||
|
||||
get author(): UserStructure {
|
||||
|
@ -146,7 +146,7 @@ export class MenuCommandContext<
|
||||
}
|
||||
|
||||
get channelId() {
|
||||
return this.interaction.channelId!;
|
||||
return this.interaction.channel.id;
|
||||
}
|
||||
|
||||
get author(): UserStructure {
|
||||
|
@ -211,7 +211,7 @@ export class ComponentContext<
|
||||
* Gets the ID of the channel of the interaction.
|
||||
*/
|
||||
get channelId() {
|
||||
return this.interaction.channelId!;
|
||||
return this.interaction.channel.id;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -181,7 +181,7 @@ export class ModalContext<M extends keyof RegisteredMiddlewares = never> extends
|
||||
* Gets the ID of the channel of the interaction.
|
||||
*/
|
||||
get channelId() {
|
||||
return this.interaction.channelId!;
|
||||
return this.interaction.channel.id;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -123,7 +123,7 @@ export class BaseInteraction<
|
||||
this.message = Transformers.Message(client, interaction.message);
|
||||
}
|
||||
this.appPermissions = new PermissionsBitField(Number(interaction.app_permissions));
|
||||
if (interaction.channel) {
|
||||
if ('channel' in interaction) {
|
||||
this.channel = channelFrom(interaction.channel, client);
|
||||
}
|
||||
this.user = this.member?.user ?? Transformers.User(client, interaction.user!);
|
||||
@ -395,6 +395,7 @@ export class AutocompleteInteraction<FromGuild extends boolean = boolean> extend
|
||||
declare data: ObjectToLower<APIApplicationCommandAutocompleteInteraction['data']>;
|
||||
options: OptionResolverStructure;
|
||||
declare entitlements: EntitlementStructure[];
|
||||
declare channel: AllChannels;
|
||||
constructor(
|
||||
client: UsingClient,
|
||||
interaction: APIApplicationCommandAutocompleteInteraction,
|
||||
@ -435,6 +436,7 @@ export class Interaction<
|
||||
FromGuild extends boolean = boolean,
|
||||
Type extends APIInteraction = APIInteraction,
|
||||
> extends BaseInteraction<FromGuild, Type> {
|
||||
declare channel: AllChannels;
|
||||
fetchMessage(messageId: string): Promise<WebhookMessageStructure> {
|
||||
return this.client.interactions.fetchResponse(this.token, messageId);
|
||||
}
|
||||
@ -504,6 +506,7 @@ export class ApplicationCommandInteraction<
|
||||
Type extends APIApplicationCommandInteraction = APIApplicationCommandInteraction,
|
||||
> extends Interaction<FromGuild, Type> {
|
||||
type!: ApplicationCommandType;
|
||||
declare channel: AllChannels;
|
||||
respond(
|
||||
data:
|
||||
| APIInteractionResponseChannelMessageWithSource
|
||||
@ -522,6 +525,7 @@ export class EntryPointInteraction<FromGuild extends boolean = boolean> extends
|
||||
FromGuild,
|
||||
APIEntryPointCommandInteraction
|
||||
> {
|
||||
declare channel: AllChannels;
|
||||
async withReponse(data?: InteractionCreateBodyRequest) {
|
||||
let body = { type: InteractionResponseType.LaunchActivity } as const;
|
||||
|
||||
@ -586,7 +590,6 @@ export class ComponentInteraction<
|
||||
Type extends APIMessageComponentInteraction = APIMessageComponentInteraction,
|
||||
> extends Interaction<FromGuild, Type> {
|
||||
declare data: ObjectToLower<APIMessageComponentInteraction['data']>;
|
||||
declare channelId: string;
|
||||
declare channel: AllChannels;
|
||||
declare type: InteractionType.MessageComponent;
|
||||
declare message: MessageStructure;
|
||||
@ -624,7 +627,7 @@ export class ButtonInteraction extends ComponentInteraction {
|
||||
|
||||
export class SelectMenuInteraction extends ComponentInteraction {
|
||||
declare data: ObjectToLower<APIMessageComponentSelectMenuInteraction['data']>;
|
||||
|
||||
declare channel: AllChannels;
|
||||
constructor(
|
||||
client: UsingClient,
|
||||
interaction: APIMessageComponentSelectMenuInteraction,
|
||||
@ -646,7 +649,7 @@ export class StringSelectMenuInteraction<
|
||||
>) {
|
||||
declare data: OmitInsert<ObjectToLower<APIMessageStringSelectInteractionData>, 'values', { values: T }>;
|
||||
declare values: T;
|
||||
|
||||
declare channel: AllChannels;
|
||||
isStringSelectMenu(): this is StringSelectMenuInteraction {
|
||||
return true;
|
||||
}
|
||||
@ -654,6 +657,7 @@ export class StringSelectMenuInteraction<
|
||||
|
||||
export class ChannelSelectMenuInteraction extends SelectMenuInteraction {
|
||||
channels: AllChannels[];
|
||||
declare channel: AllChannels;
|
||||
constructor(
|
||||
client: UsingClient,
|
||||
interaction: APIMessageComponentSelectMenuInteraction,
|
||||
@ -673,6 +677,7 @@ export class MentionableSelectMenuInteraction extends SelectMenuInteraction {
|
||||
roles: GuildRoleStructure[];
|
||||
members: InteractionGuildMemberStructure[];
|
||||
users: UserStructure[];
|
||||
declare channel: AllChannels;
|
||||
constructor(
|
||||
client: UsingClient,
|
||||
interaction: APIMessageComponentSelectMenuInteraction,
|
||||
@ -703,6 +708,7 @@ export class MentionableSelectMenuInteraction extends SelectMenuInteraction {
|
||||
|
||||
export class RoleSelectMenuInteraction extends SelectMenuInteraction {
|
||||
roles: GuildRoleStructure[];
|
||||
declare channel: AllChannels;
|
||||
constructor(
|
||||
client: UsingClient,
|
||||
interaction: APIMessageComponentSelectMenuInteraction,
|
||||
@ -721,6 +727,7 @@ export class RoleSelectMenuInteraction extends SelectMenuInteraction {
|
||||
export class UserSelectMenuInteraction extends SelectMenuInteraction {
|
||||
members: InteractionGuildMemberStructure[];
|
||||
users: UserStructure[];
|
||||
declare channel: AllChannels;
|
||||
constructor(
|
||||
client: UsingClient,
|
||||
interaction: APIMessageComponentSelectMenuInteraction,
|
||||
@ -751,7 +758,7 @@ export class ChatInputCommandInteraction<FromGuild extends boolean = boolean> ex
|
||||
APIChatInputApplicationCommandInteraction
|
||||
> {
|
||||
declare data: ObjectToLower<APIChatInputApplicationCommandInteractionData>;
|
||||
|
||||
declare channel: AllChannels;
|
||||
isChatInput(): this is ChatInputCommandInteraction {
|
||||
return true;
|
||||
}
|
||||
@ -763,7 +770,7 @@ export class UserCommandInteraction<FromGuild extends boolean = boolean> extends
|
||||
> {
|
||||
declare type: ApplicationCommandType.User;
|
||||
declare data: ObjectToLower<APIUserApplicationCommandInteractionData>;
|
||||
|
||||
declare channel: AllChannels;
|
||||
isUser(): this is UserCommandInteraction {
|
||||
return true;
|
||||
}
|
||||
@ -775,7 +782,7 @@ export class MessageCommandInteraction<FromGuild extends boolean = boolean> exte
|
||||
> {
|
||||
declare type: ApplicationCommandType.Message;
|
||||
declare data: ObjectToLower<APIMessageApplicationCommandInteractionData>;
|
||||
|
||||
declare channel: AllChannels;
|
||||
isMessage(): this is MessageCommandInteraction {
|
||||
return true;
|
||||
}
|
||||
@ -786,7 +793,7 @@ export interface ModalSubmitInteraction<FromGuild extends boolean = boolean>
|
||||
@mix(Interaction)
|
||||
export class ModalSubmitInteraction<FromGuild extends boolean = boolean> extends BaseInteraction<FromGuild> {
|
||||
declare data: ObjectToLower<APIModalSubmission>;
|
||||
|
||||
declare channel: AllChannels;
|
||||
update<WR extends boolean = false>(
|
||||
data: ComponentInteractionMessageUpdate,
|
||||
withResponse?: WR,
|
||||
|
@ -47,8 +47,8 @@ export class User extends DiscordBase<APIUser> {
|
||||
}
|
||||
|
||||
avatarDecorationURL(options?: ImageOptions) {
|
||||
if (!this.avatarDecoration) return;
|
||||
return this.rest.cdn['avatar-decorations'](this.id).get(this.avatarDecoration, options);
|
||||
if (!this.avatarDecorationData) return;
|
||||
return this.rest.cdn['avatar-decoration-presets'](this.avatarDecorationData.asset).get(options);
|
||||
}
|
||||
|
||||
bannerURL(options?: ImageOptions) {
|
||||
|
@ -1497,20 +1497,6 @@ export type GatewayThreadMemberUpdateDispatch = DataPayload<
|
||||
*/
|
||||
export type GatewayThreadMemberUpdateDispatchData = APIThreadMember & { guild_id: Snowflake };
|
||||
|
||||
/**
|
||||
* @deprecated This type doesn't accurately reflect the Discord API.
|
||||
* Use {@apilink GatewayThreadCreateDispatch},
|
||||
* {@apilink GatewayThreadUpdateDispatch}, or
|
||||
* {@apilink GatewayThreadDeleteDispatch} instead.
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-create
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-update
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
|
||||
*/
|
||||
export type GatewayThreadModifyDispatch = DataPayload<
|
||||
GatewayDispatchEvents.ThreadCreate | GatewayDispatchEvents.ThreadDelete | GatewayDispatchEvents.ThreadUpdate,
|
||||
GatewayChannelModifyDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-create
|
||||
*/
|
||||
|
@ -73,20 +73,6 @@ export interface APIApplicationCommand {
|
||||
* Set of permissions represented as a bitset
|
||||
*/
|
||||
default_member_permissions: Permissions | null;
|
||||
/**
|
||||
* Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible
|
||||
*
|
||||
* @deprecated Use `contexts` instead
|
||||
*/
|
||||
dm_permission?: boolean;
|
||||
/**
|
||||
* Whether the command is enabled by default when the app is added to a guild
|
||||
*
|
||||
* If missing, this property should be assumed as `true`
|
||||
*
|
||||
* @deprecated Use `dm_permission` and/or `default_member_permissions` instead
|
||||
*/
|
||||
default_permission?: boolean;
|
||||
/**
|
||||
* Indicates whether the command is age-restricted, defaults to `false`
|
||||
*/
|
||||
@ -201,10 +187,7 @@ export type APIApplicationCommandInteractionData =
|
||||
export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationCommandInteractionData> =
|
||||
APIBaseInteraction<InteractionType.ApplicationCommand, Data> &
|
||||
Required<
|
||||
Pick<
|
||||
APIBaseInteraction<InteractionType.ApplicationCommand, Data>,
|
||||
'app_permissions' | 'channel_id' | 'channel' | 'data'
|
||||
>
|
||||
Pick<APIBaseInteraction<InteractionType.ApplicationCommand, Data>, 'app_permissions' | 'channel' | 'data'>
|
||||
>;
|
||||
|
||||
/**
|
||||
|
@ -130,13 +130,7 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
/**
|
||||
* The channel it was sent from
|
||||
*/
|
||||
channel?: Partial<APIChannel> & Pick<APIChannel, 'id' | 'type'>;
|
||||
/**
|
||||
* The id of the channel it was sent from
|
||||
*
|
||||
* @deprecated Use {@apilink APIBaseInteraction#channel} instead
|
||||
*/
|
||||
channel_id?: Snowflake;
|
||||
channel: Partial<APIChannel> & Pick<APIChannel, 'id' | 'type'>;
|
||||
/**
|
||||
* Guild member data for the invoking user, including permissions
|
||||
*
|
||||
@ -232,18 +226,8 @@ export interface APIInteractionDataResolved {
|
||||
attachments?: Record<Snowflake, APIAttachment>;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Renamed to `APIInteractionDataResolved`
|
||||
*/
|
||||
export type APIChatInputApplicationCommandInteractionDataResolved = APIInteractionDataResolved;
|
||||
|
||||
/**
|
||||
* `users` and optional `members` from APIInteractionDataResolved, for user commands and user selects
|
||||
*/
|
||||
export type APIUserInteractionDataResolved = Pick<APIInteractionDataResolved, 'members'> &
|
||||
Required<Pick<APIInteractionDataResolved, 'users'>>;
|
||||
|
||||
/**
|
||||
* @deprecated Renamed to `APIUserInteractionDataResolved`
|
||||
*/
|
||||
export type APIUserApplicationCommandInteractionDataResolved = APIUserInteractionDataResolved;
|
||||
|
@ -15,7 +15,7 @@ export type APIMessageComponentInteraction = APIBaseInteraction<
|
||||
Required<
|
||||
Pick<
|
||||
APIBaseInteraction<InteractionType.MessageComponent, APIMessageComponentInteractionData>,
|
||||
'app_permissions' | 'channel_id' | 'channel' | 'data' | 'message'
|
||||
'app_permissions' | 'channel' | 'data' | 'message'
|
||||
>
|
||||
>;
|
||||
|
||||
@ -26,7 +26,7 @@ export type APIMessageComponentButtonInteraction = APIBaseInteraction<
|
||||
Required<
|
||||
Pick<
|
||||
APIBaseInteraction<InteractionType.MessageComponent, APIMessageButtonInteractionData>,
|
||||
'app_permissions' | 'channel_id' | 'channel' | 'data' | 'message'
|
||||
'app_permissions' | 'channel' | 'data' | 'message'
|
||||
>
|
||||
>;
|
||||
|
||||
@ -37,7 +37,7 @@ export type APIMessageComponentSelectMenuInteraction = APIBaseInteraction<
|
||||
Required<
|
||||
Pick<
|
||||
APIBaseInteraction<InteractionType.MessageComponent, APIMessageSelectMenuInteractionData>,
|
||||
'app_permissions' | 'channel_id' | 'channel' | 'data' | 'message'
|
||||
'app_permissions' | 'channel' | 'data' | 'message'
|
||||
>
|
||||
>;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { APIBaseInteraction } from './base';
|
||||
import type { InteractionType } from './responses';
|
||||
|
||||
export type APIPingInteraction = Omit<APIBaseInteraction<InteractionType.Ping, never>, 'locale'>;
|
||||
export type APIPingInteraction = Omit<APIBaseInteraction<InteractionType.Ping, never>, 'locale' | 'channel'>;
|
||||
|
@ -26,8 +26,7 @@ export type APIInteractionResponse =
|
||||
| APIInteractionResponsePong
|
||||
| APIInteractionResponseUpdateMessage
|
||||
| APIModalInteractionResponse
|
||||
| APIInteractionResponseLaunchActivity
|
||||
| APIPremiumRequiredInteractionResponse;
|
||||
| APIInteractionResponseLaunchActivity;
|
||||
|
||||
export interface APIInteractionResponsePong {
|
||||
type: InteractionResponseType.Pong;
|
||||
@ -43,10 +42,6 @@ export interface APIModalInteractionResponse {
|
||||
data: APIModalInteractionResponseCallbackData;
|
||||
}
|
||||
|
||||
export interface APIPremiumRequiredInteractionResponse {
|
||||
type: InteractionResponseType.PremiumRequired;
|
||||
}
|
||||
|
||||
export interface APIInteractionResponseChannelMessageWithSource {
|
||||
type: InteractionResponseType.ChannelMessageWithSource;
|
||||
data: APIInteractionResponseCallbackData;
|
||||
@ -102,12 +97,6 @@ export enum InteractionResponseType {
|
||||
* Respond to an interaction with an modal for a user to fill-out
|
||||
*/
|
||||
Modal,
|
||||
/**
|
||||
* Respond to an interaction with an upgrade button, only available for apps with monetization enabled
|
||||
*
|
||||
* @deprecated See https://discord.com/developers/docs/change-log#premium-apps-new-premium-button-style-deep-linking-url-schemes
|
||||
*/
|
||||
PremiumRequired,
|
||||
/**
|
||||
* Launch the Activity associated with the app. Only available for apps with Activities enabled
|
||||
*/
|
||||
|
@ -60,12 +60,6 @@ export interface APIApplication {
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
owner?: APIUser;
|
||||
/**
|
||||
* An empty string
|
||||
*
|
||||
* @deprecated This field will be removed in v11
|
||||
*/
|
||||
summary: '';
|
||||
/**
|
||||
* The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
|
||||
*
|
||||
|
@ -7,10 +7,10 @@ import type { ChannelType, OverwriteType, Permissions, Snowflake, VideoQualityMo
|
||||
import type { APIApplication } from './application';
|
||||
import type { APIPartialEmoji } from './emoji';
|
||||
import type { APIGuildMember } from './guild';
|
||||
import type { APIInteractionDataResolved, APIMessageInteraction, APIMessageInteractionMetadata } from './interactions';
|
||||
import type { APIInteractionDataResolved, APIMessageInteractionMetadata } from './interactions';
|
||||
import type { APIRole } from './permissions';
|
||||
import type { APIPoll } from './poll';
|
||||
import type { APISticker, APIStickerItem } from './sticker';
|
||||
import type { APIStickerItem } from './sticker';
|
||||
import type { APIUser } from './user';
|
||||
|
||||
/**
|
||||
@ -565,12 +565,6 @@ export interface APIMessage {
|
||||
* @unstable
|
||||
*/
|
||||
interaction_metadata?: APIMessageInteractionMetadata;
|
||||
/**
|
||||
* Sent if the message is a response to an Interaction
|
||||
*
|
||||
* @deprecated In favor of `interaction_metadata`
|
||||
*/
|
||||
interaction?: APIMessageInteraction;
|
||||
/**
|
||||
* Sent if a thread was started from this message
|
||||
*/
|
||||
@ -592,14 +586,6 @@ export interface APIMessage {
|
||||
* See https://discord.com/developers/docs/resources/sticker#sticker-item-object
|
||||
*/
|
||||
sticker_items?: APIStickerItem[];
|
||||
/**
|
||||
* The stickers sent with the message
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/sticker#sticker-object
|
||||
*
|
||||
* @deprecated Use `sticker_items` instead
|
||||
*/
|
||||
stickers?: APISticker[];
|
||||
/**
|
||||
* A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread
|
||||
*
|
||||
@ -763,7 +749,6 @@ export type APIMessageSnapshotFields = Pick<
|
||||
| 'type'
|
||||
| 'sticker_items'
|
||||
| 'components'
|
||||
| 'stickers'
|
||||
>;
|
||||
|
||||
/**
|
||||
@ -1560,15 +1545,6 @@ export enum ComponentType {
|
||||
* Select menu for channels
|
||||
*/
|
||||
ChannelSelect,
|
||||
|
||||
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
|
||||
|
||||
/**
|
||||
* Select menu for picking from defined text options
|
||||
*
|
||||
* @deprecated This is the old name for {@apilink ComponentType#StringSelect}
|
||||
*/
|
||||
SelectMenu = 3,
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -106,14 +106,6 @@ export interface APIGuild extends APIPartialGuild {
|
||||
* See https://en.wikipedia.org/wiki/Bit_field
|
||||
*/
|
||||
permissions?: Permissions;
|
||||
/**
|
||||
* Voice region id for the guild
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/voice#voice-region-object
|
||||
*
|
||||
* @deprecated This field has been deprecated in favor of `rtc_region` on the channel.
|
||||
*/
|
||||
region: string;
|
||||
/**
|
||||
* ID of afk channel
|
||||
*/
|
||||
|
@ -6,7 +6,6 @@ import type { APIApplication } from './application';
|
||||
import type { APIPartialChannel } from './channel';
|
||||
import type { APIGuild } from './guild';
|
||||
import type { APIGuildScheduledEvent } from './guildScheduledEvent';
|
||||
import type { APIInviteStageInstance } from './stageInstance';
|
||||
import type { APIUser } from './user';
|
||||
|
||||
export type APIInviteGuild = Pick<
|
||||
@ -80,12 +79,6 @@ export interface APIInvite {
|
||||
* The expiration date of this invite, returned from the `GET /invites/<code>` endpoint when `with_expiration` is `true`
|
||||
*/
|
||||
expires_at?: string | null;
|
||||
/**
|
||||
* The stage instance data if there is a public stage instance in the stage channel this invite is for
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
stage_instance?: APIInviteStageInstance;
|
||||
/**
|
||||
* The guild scheduled event data, returned from the `GET /invites/<code>` endpoint when `guild_scheduled_event_id` is a valid guild scheduled event id
|
||||
*/
|
||||
|
@ -27,12 +27,6 @@ export interface APIStageInstance {
|
||||
* See https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level
|
||||
*/
|
||||
privacy_level: StageInstancePrivacyLevel;
|
||||
/**
|
||||
* Whether or not stage discovery is disabled
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
discoverable_disabled: boolean;
|
||||
/**
|
||||
* The id of the scheduled event for this stage instance
|
||||
*/
|
||||
@ -43,16 +37,10 @@ export interface APIStageInstance {
|
||||
* https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level
|
||||
*/
|
||||
export enum StageInstancePrivacyLevel {
|
||||
/**
|
||||
* The stage instance is visible publicly, such as on stage discovery
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
Public = 1,
|
||||
/**
|
||||
* The stage instance is visible to only guild members
|
||||
*/
|
||||
GuildOnly,
|
||||
GuildOnly = 2,
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -29,12 +29,6 @@ export interface APISticker {
|
||||
* For guild stickers, the Discord name of a unicode emoji representing the sticker's expression. for standard stickers, a comma-separated list of related expressions.
|
||||
*/
|
||||
tags: string;
|
||||
/**
|
||||
* Previously the sticker asset hash, now an empty string
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
asset?: '';
|
||||
/**
|
||||
* Type of sticker
|
||||
*
|
||||
|
@ -41,12 +41,6 @@ export interface APITeamMember {
|
||||
* See https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
|
||||
*/
|
||||
membership_state: TeamMemberMembershipState;
|
||||
/**
|
||||
* Will always be `["*"]`
|
||||
*
|
||||
* @deprecated Use `role` instead
|
||||
*/
|
||||
permissions: ['*'];
|
||||
/**
|
||||
* The id of the parent team of which they are a member
|
||||
*/
|
||||
|
@ -83,14 +83,6 @@ export interface APIUser {
|
||||
* See https://discord.com/developers/docs/resources/user#user-object-user-flags
|
||||
*/
|
||||
public_flags?: UserFlags;
|
||||
/**
|
||||
* The user's avatar decoration hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
*
|
||||
* @deprecated Use `avatar_decoration_data` instead
|
||||
*/
|
||||
avatar_decoration?: string | null;
|
||||
/**
|
||||
* The data for the user's avatar decoration
|
||||
*
|
||||
@ -296,11 +288,6 @@ export enum ConnectionService {
|
||||
TikTok = 'tiktok',
|
||||
Twitch = 'twitch',
|
||||
X = 'twitter',
|
||||
/**
|
||||
* @deprecated This is the old name for {@apilink ConnectionService#X}
|
||||
*/
|
||||
|
||||
Twitter = X,
|
||||
Xbox = 'xbox',
|
||||
YouTube = 'youtube',
|
||||
}
|
||||
|
@ -33,7 +33,6 @@ import type {
|
||||
DistributivePick,
|
||||
Nullable,
|
||||
StrictPartial,
|
||||
StrictRequired,
|
||||
} from '../utils';
|
||||
import type { RESTPutAPIChannelPermissionJSONBody } from './channel';
|
||||
|
||||
@ -499,20 +498,6 @@ export interface RESTPatchAPIGuildMemberJSONBody {
|
||||
*/
|
||||
export type RESTPatchAPIGuildMemberResult = APIGuildMember;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-current-user-nick
|
||||
*
|
||||
* @deprecated Use [Modify Current Member](https://discord.com/developers/docs/resources/guild#modify-current-member) instead.
|
||||
*/
|
||||
export interface RESTPatchAPICurrentGuildMemberNicknameJSONBody {
|
||||
/**
|
||||
* Value to set users nickname to
|
||||
*
|
||||
* Requires `CHANGE_NICKNAME` permission
|
||||
*/
|
||||
nick?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-current-member
|
||||
*/
|
||||
@ -525,14 +510,6 @@ export interface RESTPatchAPICurrentGuildMemberJSONBody {
|
||||
nick?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-current-user-nick
|
||||
*
|
||||
* @deprecated Use [Modify Current Member](https://discord.com/developers/docs/resources/guild#modify-current-member) instead.
|
||||
*/
|
||||
export type RESTPatchAPICurrentGuildMemberNicknameResult =
|
||||
StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#add-guild-member-role
|
||||
*/
|
||||
@ -582,12 +559,6 @@ export type RESTGetAPIGuildBanResult = APIBan;
|
||||
* https://discord.com/developers/docs/resources/guild#create-guild-ban
|
||||
*/
|
||||
export interface RESTPutAPIGuildBanJSONBody {
|
||||
/**
|
||||
* Number of days to delete messages for (0-7)
|
||||
*
|
||||
* @deprecated use `delete_message_seconds` instead
|
||||
*/
|
||||
delete_message_days?: number | undefined;
|
||||
/**
|
||||
* Number of seconds to delete messages for, between 0 and 604800 (7 days)
|
||||
*/
|
||||
|
@ -17,13 +17,6 @@ export interface RESTGetStickerPacksResult {
|
||||
*/
|
||||
export type RESTGetAPIStickerPack = APIStickerPack;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
|
||||
*
|
||||
* @deprecated Use `RESTGetStickerPacksResult` instead
|
||||
*/
|
||||
export type RESTGetNitroStickerPacksResult = RESTGetStickerPacksResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#list-guild-stickers
|
||||
*/
|
||||
|
@ -14,8 +14,3 @@ export type RESTGetAPICurrentUserVoiceState = RESTGetAPIUserVoiceState;
|
||||
* https://discord.com/developers/docs/resources/voice#get-user-voice-state
|
||||
*/
|
||||
export type RESTGetAPIUserVoiceState = APIVoiceState;
|
||||
|
||||
/**
|
||||
* @deprecated This was exported with the wrong name, use `RESTGetAPIVoiceRegionsResult` instead
|
||||
*/
|
||||
export type GetAPIVoiceRegionsResult = RESTGetAPIVoiceRegionsResult;
|
||||
|
@ -583,12 +583,6 @@ export const PermissionFlagsBits = {
|
||||
* Applies to channel types: Text, Voice, Stage
|
||||
*/
|
||||
ManageWebhooks: 1n << 29n,
|
||||
/**
|
||||
* Allows management and editing of emojis, stickers, and soundboard sounds
|
||||
*
|
||||
* @deprecated This is the old name for {@apilink PermissionFlagsBits#ManageGuildExpressions}
|
||||
*/
|
||||
ManageEmojisAndStickers: 1n << 30n,
|
||||
/**
|
||||
* Allows for editing and deleting emojis, stickers, and soundboard sounds created by all users
|
||||
*/
|
||||
@ -771,35 +765,6 @@ export enum ChannelType {
|
||||
* See https://creator-support.discord.com/hc/articles/14346342766743
|
||||
*/
|
||||
GuildMedia,
|
||||
|
||||
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
|
||||
|
||||
/**
|
||||
* A channel that users can follow and crosspost into their own guild
|
||||
*
|
||||
* @deprecated This is the old name for {@apilink ChannelType#GuildAnnouncement}
|
||||
*
|
||||
* See https://support.discord.com/hc/articles/360032008192
|
||||
*/
|
||||
GuildNews = 5,
|
||||
/**
|
||||
* A temporary sub-channel within a Guild Announcement channel
|
||||
*
|
||||
* @deprecated This is the old name for {@apilink ChannelType#AnnouncementThread}
|
||||
*/
|
||||
GuildNewsThread = 10,
|
||||
/**
|
||||
* A temporary sub-channel within a Guild Text channel
|
||||
*
|
||||
* @deprecated This is the old name for {@apilink ChannelType#PublicThread}
|
||||
*/
|
||||
GuildPublicThread = 11,
|
||||
/**
|
||||
* A temporary sub-channel within a Guild Text channel that is only viewable by those invited and those with the Manage Threads permission
|
||||
*
|
||||
* @deprecated This is the old name for {@apilink ChannelType#PrivateThread}
|
||||
*/
|
||||
GuildPrivateThread = 12,
|
||||
}
|
||||
|
||||
export enum VideoQualityMode {
|
||||
|
Loading…
x
Reference in New Issue
Block a user