Skip to content

Commit

Permalink
feat(Message): applicationID for interaction responses (#5765)
Browse files Browse the repository at this point in the history
  • Loading branch information
almostSouji committed Jun 7, 2021
1 parent bf191df commit 65dc00f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/structures/Message.js
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion typings/index.d.ts
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 65dc00f

Please sign in to comment.