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 29, 2021
1 parent d9308c8 commit 857fb7d
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions lib/structures/Interaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,12 @@ class Interaction extends Base {
*/

async createMessage(content) {
let data
if(typeof content == "string") {
data = {content: content};
} else {
data = content;
}
return await this._client.requestHandler.request("POST", Endpoints.INTERACTION_RESPONSE(this.id, this.token), true, {
type: 4,
content: data.content,
embeds: data.embeds || [],
allowed_mentions: data.allowed_mentions || null,
flags: data.flags || 0,
content: content.content,
embeds: content.embeds || [],
allowed_mentions: content.allowed_mentions || null,
flags: content.flags || 0,
})
}

Expand Down

0 comments on commit 857fb7d

Please sign in to comment.