Skip to content

Commit

Permalink
docs: add deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Syjalo committed Apr 25, 2024
1 parent fcfa587 commit 0572167
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/discord.js/src/structures/ApplicationCommand.js
Expand Up @@ -145,6 +145,7 @@ class ApplicationCommand extends Base {
* Whether the command can be used in DMs
* <info>This property is always `null` on guild commands</info>
* @type {?boolean}
* @deprecated Use {@link ApplicationCommand#contexts} instead.
*/
this.dmPermission = data.dm_permission;
} else {
Expand Down
1 change: 1 addition & 0 deletions packages/discord.js/src/structures/Message.js
Expand Up @@ -420,6 +420,7 @@ class Message extends Base {
* @property {string} commandName The name of the interaction's application command,
* as well as the subcommand and subcommand group, where applicable
* @property {User} user The user that invoked the interaction
* @deprecated Use {@link Message#interactionMetadata} instead.
*/

if (data.interaction) {
Expand Down
2 changes: 2 additions & 0 deletions packages/discord.js/typings/index.d.ts
Expand Up @@ -445,6 +445,7 @@ export class ApplicationCommand<PermissionsFetchType = {}> extends Base {
public description: string;
public descriptionLocalizations: LocalizationMap | null;
public descriptionLocalized: string | null;
/** @deprecated Use {@link ApplicationCommand.contexts} instead */
public dmPermission: boolean | null;
public guild: Guild | null;
public guildId: Snowflake | null;
Expand Down Expand Up @@ -2100,6 +2101,7 @@ export class Message<InGuild extends boolean = boolean> extends Base {
public get guild(): If<InGuild, Guild>;
public get hasThread(): boolean;
public id: Snowflake;
/** @deprecated Use {@link Message.interactionMetadata} instead */
public interaction: MessageInteraction | null;
public interactionMetadata: MessageInteractionMetadata | null;
public get member(): GuildMember | null;
Expand Down

0 comments on commit 0572167

Please sign in to comment.