diff options
| author | Andrew Lee <andrew@alee14.me> | 2025-03-01 23:32:43 -0500 |
|---|---|---|
| committer | Andrew Lee <andrew@alee14.me> | 2025-03-01 23:32:43 -0500 |
| commit | 1e2292f197ba69cc50d9471c8fac5951bcda4352 (patch) | |
| tree | 9e4b83d3242b0134269bd25fa163e0d59d08aaa2 /commands/quote.js | |
| parent | 44f7f14736aaf77858ee71c80abeb3c13343d3c2 (diff) | |
| download | AleeBot-1e2292f197ba69cc50d9471c8fac5951bcda4352.tar.gz AleeBot-1e2292f197ba69cc50d9471c8fac5951bcda4352.tar.bz2 AleeBot-1e2292f197ba69cc50d9471c8fac5951bcda4352.zip | |
New api endpoint; Now should display the submitter's username
Diffstat (limited to 'commands/quote.js')
| -rw-r--r-- | commands/quote.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/commands/quote.js b/commands/quote.js index f19675f..72bd07b 100644 --- a/commands/quote.js +++ b/commands/quote.js @@ -28,14 +28,16 @@ module.exports.run = async (client, message, args) => { quoteID = quoteList[random[0] % quoteList.length].id; } - const quote = await quoteDB.findOne({ where: { id: quoteID } }) + const quote = await quoteDB.findOne({ where: { id: quoteID } }); + + let userSubmitter = await client.users.fetch(quote.submitter); if (quote) { const quoteEmbed = new MessageEmbed() .setAuthor({ name: quote.author, iconURL: quote.authorImage }) .setDescription(quote.quote) .setColor('#1fd619') - .setFooter(`- ${quote.year}\nSubmitted by ${quote.submitter}`); + .setFooter(`- ${quote.year}\nSubmitted by ${userSubmitter.username}`); await message.reply({ embeds: [quoteEmbed] }) } else { |
