mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
feat(Message): applicationID for interaction responses (#5765)
This commit is contained in:
@@ -192,7 +192,13 @@ class Message extends Base {
|
|||||||
* Supplemental application information for group activities
|
* Supplemental application information for group activities
|
||||||
* @type {?ClientApplication}
|
* @type {?ClientApplication}
|
||||||
*/
|
*/
|
||||||
this.application = data.application ? new ClientApplication(this.client, data.application) : null;
|
this.groupActivityApplication = data.application ? new ClientApplication(this.client, data.application) : null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID of the application of the interaction that sent this message, if any
|
||||||
|
* @type {?Snowflake}
|
||||||
|
*/
|
||||||
|
this.applicationID = data.application_id ?? null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Group activity
|
* Group activity
|
||||||
@@ -761,7 +767,7 @@ class Message extends Base {
|
|||||||
return super.toJSON({
|
return super.toJSON({
|
||||||
channel: 'channelID',
|
channel: 'channelID',
|
||||||
author: 'authorID',
|
author: 'authorID',
|
||||||
application: 'applicationID',
|
groupActivityApplication: 'groupActivityApplicationID',
|
||||||
guild: 'guildID',
|
guild: 'guildID',
|
||||||
cleanContent: true,
|
cleanContent: true,
|
||||||
member: false,
|
member: false,
|
||||||
|
|||||||
3
typings/index.d.ts
vendored
3
typings/index.d.ts
vendored
@@ -1195,7 +1195,7 @@ declare module 'discord.js' {
|
|||||||
private patch(data: unknown): Message;
|
private patch(data: unknown): Message;
|
||||||
|
|
||||||
public activity: MessageActivity | null;
|
public activity: MessageActivity | null;
|
||||||
public application: ClientApplication | null;
|
public applicationID: Snowflake | null;
|
||||||
public attachments: Collection<Snowflake, MessageAttachment>;
|
public attachments: Collection<Snowflake, MessageAttachment>;
|
||||||
public author: User;
|
public author: User;
|
||||||
public channel: TextChannel | DMChannel | NewsChannel;
|
public channel: TextChannel | DMChannel | NewsChannel;
|
||||||
@@ -1211,6 +1211,7 @@ declare module 'discord.js' {
|
|||||||
public readonly editedAt: Date | null;
|
public readonly editedAt: Date | null;
|
||||||
public editedTimestamp: number | null;
|
public editedTimestamp: number | null;
|
||||||
public embeds: MessageEmbed[];
|
public embeds: MessageEmbed[];
|
||||||
|
public groupActivityApplication: ClientApplication | null;
|
||||||
public readonly guild: Guild | null;
|
public readonly guild: Guild | null;
|
||||||
public id: Snowflake;
|
public id: Snowflake;
|
||||||
public interaction: MessageInteraction | null;
|
public interaction: MessageInteraction | null;
|
||||||
|
|||||||
Reference in New Issue
Block a user