Skip to content

Commit 5088fad

Browse files
committed
docs: add deprecation warnings
1 parent d5c6961 commit 5088fad

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

packages/discord.js/src/structures/ApplicationCommand.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ class ApplicationCommand extends Base {
145145
* Whether the command can be used in DMs
146146
* <info>This property is always `null` on guild commands</info>
147147
* @type {?boolean}
148+
* @deprecated Use {@link ApplicationCommand#contexts} instead.
148149
*/
149150
this.dmPermission = data.dm_permission;
150151
} else {

packages/discord.js/src/structures/Message.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ class Message extends Base {
420420
* @property {string} commandName The name of the interaction's application command,
421421
* as well as the subcommand and subcommand group, where applicable
422422
* @property {User} user The user that invoked the interaction
423+
* @deprecated Use {@link Message#interactionMetadata} instead.
423424
*/
424425

425426
if (data.interaction) {

packages/discord.js/typings/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ export class ApplicationCommand<PermissionsFetchType = {}> extends Base {
445445
public description: string;
446446
public descriptionLocalizations: LocalizationMap | null;
447447
public descriptionLocalized: string | null;
448+
/** @deprecated Use {@link ApplicationCommand.contexts} instead */
448449
public dmPermission: boolean | null;
449450
public guild: Guild | null;
450451
public guildId: Snowflake | null;
@@ -2100,6 +2101,7 @@ export class Message<InGuild extends boolean = boolean> extends Base {
21002101
public get guild(): If<InGuild, Guild>;
21012102
public get hasThread(): boolean;
21022103
public id: Snowflake;
2104+
/** @deprecated Use {@link Message.interactionMetadata} instead */
21032105
public interaction: MessageInteraction | null;
21042106
public interactionMetadata: MessageInteractionMetadata | null;
21052107
public get member(): GuildMember | null;

0 commit comments

Comments
 (0)