From 3192f2aa907ef9729a6953db8471b5cc452cae86 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Mon, 2 Aug 2021 19:53:28 -0400 Subject: [PATCH] Fix --- commands/games-sp/google-feud.js | 2 +- commands/voice/play.js | 2 +- framework/Extensions.js | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/commands/games-sp/google-feud.js b/commands/games-sp/google-feud.js index ddc01b11..e8cf4f5c 100644 --- a/commands/games-sp/google-feud.js +++ b/commands/games-sp/google-feud.js @@ -73,7 +73,7 @@ module.exports = class GoogleFeudCommand extends Command { return msg.say(`You win! Nice job, master of Google!\n**Final Score: $${formatNumber(score)}**`); } const final = this.makeEmbed(question, tries, suggestions, suggestions); - return msg.say(`Better luck next time!\n**Final Score: $${formatNumber(score)}**`, { embed: final }); + return msg.say(`Better luck next time!\n**Final Score: $${formatNumber(score)}**`, { embeds: [final] }); } catch (err) { this.client.games.delete(msg.channel.id); return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); diff --git a/commands/voice/play.js b/commands/voice/play.js index 6cf5212d..398d258d 100644 --- a/commands/voice/play.js +++ b/commands/voice/play.js @@ -51,7 +51,7 @@ module.exports = class PlayCommand extends Command { if (!canPlay) return msg.reply('I cannot play this video.'); if (canPlay === 'length') return msg.reply('This video is longer than 15 minutes, so I can\'t play it.'); await msg.reply('Is this the video you want to play? Type **[y]es** or **[n]o**.', { - embed: this.generateEmbed(data) + embeds: [this.generateEmbed(data)] }); const verification = await verify(msg.channel, msg.author); if (!verification) return msg.reply('Aborting playback.'); diff --git a/framework/Extensions.js b/framework/Extensions.js index 2041c836..da293785 100644 --- a/framework/Extensions.js +++ b/framework/Extensions.js @@ -1,17 +1,17 @@ -const { Message, APIMessage } = require('discord.js'); +const { Message, MessagePayload, APIMessage } = require('discord.js'); Reflect.defineProperty(Message.prototype, 'say', { value: function (content, options) { - return this.channel.send(content, options); + return this.channel.send({ content, ...options }); } }); Reflect.defineProperty(Message.prototype, 'embed', { value: function (embed, options) { - return this.channel.send(new APIMessage(this.channel, { embed, ...options })); + return this.channel.send({ embeds: [embed], ...options }); } }); Reflect.defineProperty(Message.prototype, 'code', { value: function (lang, content, options) { - return this.channel.send(content, { code: lang, ...options }); + return this.channel.send({ content, lang, ...options }); } }); Reflect.defineProperty(Message.prototype, 'direct', { value: function (content, options) { - return this.author.send(content, options); + return this.author.send({ content, options }); } });