Skip to content

Commit

Permalink
Process deprecations for 1.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DonovanDMC committed Mar 19, 2024
1 parent 9d619cc commit 65ca7e8
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 153 deletions.
98 changes: 0 additions & 98 deletions lib/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1510,103 +1510,5 @@ export enum JSONErrorCodes {
GUILD_GO_LIVE_LIMITED_ACCESS = 400003,
GUILD_LIMITED_ACCESS_MAX = 409999,
FAILED_TO_BAN_USERS = 500000,


/** @deprecated Use {@link Constants~JSONErrorCodes.SLOWMODE_RATE_LIMITED | SLOWMODE_RATE_LIMITED } instead. This will be removed in `1.10.0`. */
SLOWMODE_RATE_LIMIT = 20016,
/** @deprecated Use {@link Constants~JSONErrorCodes.CHANNEL_FOLLOWING_EDIT_RATE_LIMITED | CHANNEL_FOLLOWING_EDIT_RATE_LIMITED } instead. This will be removed in `1.10.0`. */
ANNOUNCEMENT_EDIT_LIMIT_EXCEEDED = 20022,
/** @deprecated Use {@link Constants~JSONErrorCodes.TOO_MANY_GUILDS | TOO_MANY_GUILDS } instead. This will be removed in `1.10.0`. */
MAXIMUM_NUMBER_OF_GUILDS = 30001,
/** @deprecated Use {@link Constants~JSONErrorCodes.TOO_MANY_FRIENDS | TOO_MANY_FRIENDS } instead. This will be removed in `1.10.0`. */
MAXIMUM_NUMBER_OF_FRIENDS = 30002,
/** @deprecated Use {@link Constants~JSONErrorCodes.TOO_MANY_PINS_IN_CHANNEL | TOO_MANY_PINS_IN_CHANNEL } instead. This will be removed in `1.10.0`. */
MAXIMUM_NUMBER_OF_PINS = 30003,
/** @deprecated Use {@link Constants~JSONErrorCodes.TOO_MANY_RECIPIENTS | TOO_MANY_RECIPIENTS } instead. This will be removed in `1.10.0`. */
MAXIMUM_NUMBER_OF_RECIPIENTS = 30004,
/** @deprecated Use {@link Constants~JSONErrorCodes.TOO_MANY_GUILD_ROLES | TOO_MANY_GUILD_ROLES } instead. This will be removed in `1.10.0`. */
MAXIMUM_NUMBER_OF_GUILD_ROLES = 30005,
/** @deprecated Use {@link Constants~JSONErrorCodes.TOO_MANY_WEBHOOKS | TOO_MANY_WEBHOOKS } instead. This will be removed in `1.10.0`. */
MAXIMUM_NUMBER_OF_WEBHOOKS = 30007,
/** @deprecated Use {@link Constants~JSONErrorCodes.TOO_MANY_EMOJI | TOO_MANY_EMOJI } instead. This will be removed in `1.10.0`. */
MAXIMUM_NUMBER_OF_EMOJIS = 30008,
/** @deprecated Use {@link Constants~JSONErrorCodes.TOO_MANY_REACTIONS | TOO_MANY_REACTIONS } instead. This will be removed in `1.10.0`. */
MAXIMUM_NUMBER_OF_REACTIONS = 30010,
/** @deprecated Use {@link Constants~JSONErrorCodes.TOO_MANY_ATTACHMENTS | TOO_MANY_ATTACHMENTS } instead. This will be removed in `1.10.0`. */
MAXIMUM_NUMBER_OF_ATTACHMENTS = 30015,
/** @deprecated Use {@link Constants~JSONErrorCodes.TOO_MANY_INVITES | TOO_MANY_INVITES } instead. This will be removed in `1.10.0`. */
MAXIMUM_NUMBER_OF_INVITES = 30016,
/** @deprecated Use {@link Constants~JSONErrorCodes.TOO_MANY_ANIMATED_EMOJI | TOO_MANY_ANIMATED_EMOJI } instead. This will be removed in `1.10.0`. */
MAXIMUM_NUMBER_OF_ANIMATED_EMOJIS = 30018,
/** @deprecated Use {@link Constants~JSONErrorCodes.GUILD_AT_CAPACITY | GUILD_AT_CAPACITY } instead. This will be removed in `1.10.0`. */
MAXIMUM_NUMBER_OF_SERVER_MEMBERS = 30019,
/** @deprecated Use {@link Constants~JSONErrorCodes.TOO_MANY_THREAD_MEMBERS | TOO_MANY_THREAD_MEMBERS } instead. This will be removed in `1.10.0`. */
TOO_MANY_THREAD_PARTICIPANTS = 30033,
/** @deprecated Use {@link Constants~JSONErrorCodes.TOO_MANY_PREMIUM_EMOJIS | TOO_MANY_PREMIUM_EMOJIS } instead. This will be removed in `1.10.0`. */
MAXIMUM_PREMIUM_EMOJIS = 30056,
/** @deprecated Use {@link Constants~JSONErrorCodes.TOO_MANY_GUILD_WEBHOOKS | TOO_MANY_GUILD_WEBHOOKS } instead. This will be removed in `1.10.0`. */
MAXIMUM_GUILD_WEBHOOKS = 30058,
/** @deprecated Use {@link Constants~JSONErrorCodes.EMAIL_VERIFICATION_REQUIRED | EMAIL_VERIFICATION_REQUIRED } instead. This will be removed in `1.10.0`. */
ACCOUNT_VERIFICATION_REQUIRED = 40002,
/** @deprecated Use {@link Constants~JSONErrorCodes.NON_MODERATED_TAG_REQUIRED | NON_MODERATED_TAG_REQUIRED } instead. This will be removed in `1.10.0`. */
NO_NON_MODERATOR_TAGS = 40066,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_ACTION_DM | INVALID_ACTION_DM } instead. This will be removed in `1.10.0`. */
CANNOT_EXECUTE_ON_DM = 50003,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_EMBED_DISABLED | INVALID_EMBED_DISABLED } instead. This will be removed in `1.10.0`. */
GUILD_WIDGET_DISABLED = 50004,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_MESSAGE_AUTHOR | INVALID_MESSAGE_AUTHOR } instead. This will be removed in `1.10.0`. */
CANNOT_EDIT_MESSAGE_BY_OTHER = 50005,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_MESSAGE_EMPTY | INVALID_MESSAGE_EMPTY } instead. This will be removed in `1.10.0`. */
CANNOT_SEND_EMPTY_MESSAGE = 50006,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_MESSAGE_SEND_USER | INVALID_MESSAGE_SEND_USER } instead. This will be removed in `1.10.0`. */
CANNOT_MESSAGE_USER = 50007,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_MESSAGE_SEND_NON_TEXT | INVALID_MESSAGE_SEND_NON_TEXT } instead. This will be removed in `1.10.0`. */
CANNOT_SEND_MESSAGES_IN_NON_TEXT_CHANNEL = 50008,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_MESSAGE_VERIFICATION_LEVEL | INVALID_MESSAGE_VERIFICATION_LEVEL } instead. This will be removed in `1.10.0`. */
CHANNEL_VERIFICATION_LEVEL_TOO_HIGH = 50009,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_OAUTH_APP_BOT | INVALID_OAUTH_APP_BOT } instead. This will be removed in `1.10.0`. */
OAUTH2_APPLICATION_BOT_ABSENT = 50010,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_OAUTH_APP_LIMIT | INVALID_OAUTH_APP_LIMIT } instead. This will be removed in `1.10.0`. */
MAXIMUM_OAUTH2_APPLICATIONS = 50011,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_PERMISSIONS | INVALID_PERMISSIONS } instead. This will be removed in `1.10.0`. */
YOU_LACK_PERMISSIONS = 50013,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_TOKEN | INVALID_TOKEN } instead. This will be removed in `1.10.0`. */
INVALID_AUTHENTICATION_TOKEN = 50014,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_NOTE | INVALID_NOTE } instead. This will be removed in `1.10.0`. */
NOTE_IS_TOO_LONG = 50015,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_BULK_DELETE_COUNT | INVALID_BULK_DELETE_COUNT } instead. This will be removed in `1.10.0`. */
INVALID_BULK_DELETE_QUANTITY = 50016,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_PIN_MESSAGE_CHANNEL | INVALID_PIN_MESSAGE_CHANNEL } instead. This will be removed in `1.10.0`. */
INVALID_CHANNEL_PIN = 50019,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_INVITE_CODE | INVALID_INVITE_CODE } instead. This will be removed in `1.10.0`. */
INVALID_OR_TAKEN_INVITE_CODE = 50020,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_CHANNEL_TYPE | INVALID_CHANNEL_TYPE } instead. This will be removed in `1.10.0`. */
CANNOT_EXECUTE_ON_CHANNEL_TYPE = 50024,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_OAUTH2_ACCESS_TOKEN | INVALID_OAUTH2_ACCESS_TOKEN } instead. This will be removed in `1.10.0`. */
INVALID_OAUTH_TOKEN = 50025,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_OAUTH2_MISSING_SCOPE | INVALID_OAUTH2_MISSING_SCOPE } instead. This will be removed in `1.10.0`. */
MISSING_OAUTH_SCOPE = 50026,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_FILE_ASSET_SIZE | INVALID_FILE_ASSET_SIZE } instead. This will be removed in `1.10.0`. */
FILE_UPLOADED_EXCEEDS_MAXIMUM_SIZE = 50045,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_FILE_ASSET | INVALID_FILE_ASSET } instead. This will be removed in `1.10.0`. */
INVALID_FILE_UPLOADED = 50046,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_GIFT_SELF_REDEMPTION | INVALID_GIFT_SELF_REDEMPTION } instead. This will be removed in `1.10.0`. */
CANNOT_SELF_REDEEM_GIFT = 50054,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_COUNTRY_CODE | INVALID_COUNTRY_CODE } instead. This will be removed in `1.10.0`. */
SERVER_NOT_AVAILABLE_IN_LOCATION = 50095,
/** @deprecated Use {@link Constants~JSONErrorCodes.INVALID_FILE_ASSET_SIZE_RESIZE_GIF | INVALID_FILE_ASSET_SIZE_RESIZE_GIF } instead. This will be removed in `1.10.0`. */
FAILED_TO_RESIZE_ASSET = 50138,
/** @deprecated Use {@link Constants~JSONErrorCodes.MFA_REQUIRED | MFA_REQUIRED } instead. This will be removed in `1.10.0`. */
TWO_FACTOR_REQUIRED = 60003,
/** @deprecated Use {@link Constants~JSONErrorCodes.RELATIONSHIP_INVALID_DISCORD_TAG | RELATIONSHIP_INVALID_DISCORD_TAG } instead. This will be removed in `1.10.0`. */
NO_USERS_WITH_DISCORDTAG_EXIST = 80004,
/** @deprecated Use {@link Constants~JSONErrorCodes.TOO_MANY_THREADS | TOO_MANY_THREADS } instead. This will be removed in `1.10.0`. */
MAXIMUM_NUMBER_OF_ACTIVE_THREADS = 160006,
/** @deprecated Use {@link Constants~JSONErrorCodes.TOO_MANY_ANNOUNCEMENT_THREADS | TOO_MANY_ANNOUNCEMENT_THREADS } instead. This will be removed in `1.10.0`. */
MAXIMUM_NUMBER_OF_ACTIVE_ANNOUNCEMENT_THREADS = 160007,
/** @deprecated Use {@link Constants~JSONErrorCodes.AUTOMOD_MESSAGE_BLOCKED | AUTOMOD_MESSAGE_BLOCKED } instead. This will be removed in `1.10.0`. */
MESSAGE_BLOCKED_BY_AUTOMATIC_MODERATION = 200000,
/** @deprecated Use {@link Constants~JSONErrorCodes.AUTOMOD_TITLE_BLOCKED | AUTOMOD_TITLE_BLOCKED } instead. This will be removed in `1.10.0`. */
TITLE_BLOCKED_BY_AUTOMATIC_MODERATION = 200001,
}
/* eslint-enable @typescript-eslint/no-duplicate-enum-values */
5 changes: 0 additions & 5 deletions lib/rest/RESTManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ export default class RESTManager {
this.webhooks = new Webhooks(this);
}

/** @deprecated Use {@link RESTManager#applications | RESTManager#applications} instead. This will be removed in `1.10.0`. */
get applicationCommands(): RESTManager["applications"] {
return this.applications;
}

get client(): Client {
return this.#client;
}
Expand Down
31 changes: 0 additions & 31 deletions lib/routes/Miscellaneous.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/** @module REST/Miscellaneous */
import type Applications from "./Applications";
import * as Routes from "../util/Routes";
import type RESTManager from "../rest/RESTManager";
import type { RawSticker, RawStickerPack, Sticker, StickerPack } from "../types/guilds";
Expand All @@ -12,36 +11,6 @@ export default class Miscellaneous {
this.#manager = manager;
}

/** @deprecated Use {@link REST/Applications#createTestEntitlement | Application#createTestEntitlement} instead. This will be removed in `1.10.0`. */
get createTestEntitlement(): Applications["createTestEntitlement"] {
return this.#manager.applications.createTestEntitlement.bind(this.#manager.applications);
}

/** @deprecated Use {@link REST/Applications#deleteTestEntitlement | Application#deleteTestEntitlement} instead. This will be removed in `1.10.0`. */
get deleteEntitlement(): Applications["deleteTestEntitlement"] {
return this.#manager.applications.deleteTestEntitlement.bind(this.#manager.applications);
}

/** @deprecated Use {@link REST/Applications#getCurrent | Application#getCurrent} instead. This will be removed in `1.10.0`. */
get getApplication(): Applications["getCurrent"] {
return this.#manager.applications.getCurrent.bind(this.#manager.applications);
}

/** @deprecated Use {@link REST/Applications#getClient | Application#getClient} instead. This will be removed in `1.10.0`. */
get getClientApplication(): Applications["getClient"] {
return this.#manager.applications.getClient.bind(this.#manager.applications);
}

/** @deprecated Use {@link REST/Applications#getEntitlements | Application#getEntitlements} instead. This will be removed in `1.10.0`. */
get getEntitlements(): Applications["getEntitlements"] {
return this.#manager.applications.getEntitlements.bind(this.#manager.applications);
}

/** @deprecated Use {@link REST/Applications#getSKUs | Application#getSKUs} instead. This will be removed in `1.10.0`. */
get getSKUs(): Applications["getSKUs"] {
return this.#manager.applications.getSKUs.bind(this.#manager.applications);
}

/**
* Get a sticker.
* @param stickerID The ID of the sticker to get.
Expand Down
1 change: 0 additions & 1 deletion lib/structures/AutocompleteInteraction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ export default class AutocompleteInteraction<T extends AnyInteractionChannel | U
...super.toJSON(),
appPermissions: this.appPermissions.toJSON(),
authorizingIntegrationOwners: this.authorizingIntegrationOwners,
channel: this.channelID, // TODO: remove in 1.10.0
channelID: this.channelID,
context: this.context,
data: this.data,
Expand Down
5 changes: 0 additions & 5 deletions lib/structures/ClientApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ export default class ClientApplication extends Base {
}
}

/** @deprecated Use {@link ClientApplication#deleteTestEntitlement | ClientApplication#deleteTestEntitlement} instead. This will be removed in `1.10.0`. */
get deleteEntitlement(): ClientApplication["deleteTestEntitlement"] {
return this.deleteTestEntitlement.bind(this);
}

/**
* Overwrite all existing global application commands.
* @param options The commands.
Expand Down
8 changes: 0 additions & 8 deletions lib/structures/Interaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,6 @@ export default class Interaction extends Base {
return this.type === InteractionTypes.MODAL_SUBMIT;
}

/**
* A type guard, checking if this interaction is a {@link ModalSubmitInteraction | Modal Submit Interaction}.
* @deprecated Use {@link Interaction#isModalSubmitInteraction | isModalSubmitInteraction}. This will be removed in `1.10.0`.
*/
isModelSubmitInteraction(): this is IModalSubmitInteraction {
return this.isModalSubmitInteraction();
}

/** A type guard, checking if this interaction is a {@link PingInteraction | Ping Interaction}. */
isPingInteraction(): this is IPingInteraction {
return this.type === InteractionTypes.PING;
Expand Down
3 changes: 0 additions & 3 deletions lib/types/interactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ export interface ModalSubmitInteractionResponse {
type: InteractionResponseTypes.MODAL;
}

/** @deprecated Use {@link Types/Interactions~ModalSubmitInteractionResponse | ModalSubmitInteractionResponse} instead. This will be removed in `1.10.0` */
export type ModalInteractionResponse = ModalSubmitInteractionResponse;

export interface PremiumRequiredResponse {
data: Record<string, never>;
type: InteractionResponseTypes.PREMIUM_REQUIRED;
Expand Down
2 changes: 0 additions & 2 deletions lib/types/json.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ export interface JSONAttachment extends JSONBase {
export interface JSONAutocompleteInteraction extends JSONInteraction {
appPermissions: JSONPermission;
authorizingIntegrationOwners: AuthorizingIntegrationOwners;
/** @deprecated Use {@link JSONAutocompleteInteraction#channelID | channelID}. This will be removed in `1.10.0`. */
channel: string;
channelID: string;
context?: InteractionContextTypes;
data: AutocompleteInteractionData;
Expand Down

0 comments on commit 65ca7e8

Please sign in to comment.