mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13: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
|
||||
* @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
|
||||
@@ -761,7 +767,7 @@ class Message extends Base {
|
||||
return super.toJSON({
|
||||
channel: 'channelID',
|
||||
author: 'authorID',
|
||||
application: 'applicationID',
|
||||
groupActivityApplication: 'groupActivityApplicationID',
|
||||
guild: 'guildID',
|
||||
cleanContent: true,
|
||||
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;
|
||||
|
||||
public activity: MessageActivity | null;
|
||||
public application: ClientApplication | null;
|
||||
public applicationID: Snowflake | null;
|
||||
public attachments: Collection<Snowflake, MessageAttachment>;
|
||||
public author: User;
|
||||
public channel: TextChannel | DMChannel | NewsChannel;
|
||||
@@ -1211,6 +1211,7 @@ declare module 'discord.js' {
|
||||
public readonly editedAt: Date | null;
|
||||
public editedTimestamp: number | null;
|
||||
public embeds: MessageEmbed[];
|
||||
public groupActivityApplication: ClientApplication | null;
|
||||
public readonly guild: Guild | null;
|
||||
public id: Snowflake;
|
||||
public interaction: MessageInteraction | null;
|
||||
|
||||
Reference in New Issue
Block a user