Skip to content

Commit

Permalink
Update Interaction.js
Browse files Browse the repository at this point in the history
  • Loading branch information
JustCat80 committed May 30, 2021
1 parent 5e51d79 commit 6a154f9
Showing 1 changed file with 4 additions and 24 deletions.
28 changes: 4 additions & 24 deletions lib/structures/Interaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,7 @@ class Interaction extends Base {
content.allowed_mentions = this._client._formatAllowedMentions(content.allowedMentions);
}
}
return this._client.requestHandler.request("POST", Endpoints.WEBHOOK_TOKEN(this.applicationId, this.token), true, {
content: content.content,
embeds: content.embeds || [],
allowed_mentions: content.allowed_mentions || null,
tts: content.tts,
flags: content.flags || 0,
}, content.file)//.then((response) => new Message(response, this)); Errored out?
return this._client.requestHandler.request("POST", Endpoints.WEBHOOK_TOKEN(this.applicationId, this.token), true, content, content.file)//.then((response) => new Message(response, this)); Errored out?
}

/**
Expand Down Expand Up @@ -147,13 +141,7 @@ class Interaction extends Base {
}
return this._client.requestHandler.request("POST", Endpoints.INTERACTION_RESPOND(this.id, this.token), true, {
type: Constants.InteractionResponseType.CHANNEL_MESSAGE_WITH_SOURCE,
data: {
content: content.content,
embeds: content.embeds || [],
allowed_mentions: content.allowed_mentions || null,
tts: content.tts,
flags: content.flags || 0,
}
data: content
})
}

Expand Down Expand Up @@ -214,11 +202,7 @@ class Interaction extends Base {
content.allowed_mentions = this._client._formatAllowedMentions(content.allowedMentions);
}
}
return this._client.requestHandler.request("PATCH", Endpoints.WEBHOOK_MESSAGE(this.applicationId, this.token, messageId), true, {
content: content.content,
embeds: content.embeds || [],
allowed_mentions: content.allowed_mentions || null,
})
return this._client.requestHandler.request("PATCH", Endpoints.WEBHOOK_MESSAGE(this.applicationId, this.token, messageId), true, content)
}

/**
Expand All @@ -243,11 +227,7 @@ class Interaction extends Base {
}
return this._client.requestHandler.request("POST", Endpoints.INTERACTION_RESPOND(this.id, this.token), true, {
type: Constants.InteractionResponseType.UPDATE_MESSAGE,
data: {
content: content.content,
embeds: content.embeds || [],
allowed_mentions: content.allowed_mentions || null,
}
data: content
})
}

Expand Down

0 comments on commit 6a154f9

Please sign in to comment.