Format Upvotes like real reddit in subreddit commands

This commit is contained in:
Dragon Fire
2020-06-08 16:07:03 -04:00
parent c6365bb4a5
commit 7ff1de7539
8 changed files with 23 additions and 23 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
const SubredditCommandBase = require('../../structures/commands/Subreddit');
const { MessageEmbed } = require('discord.js');
const { shorten, formatNumber } = require('../../util/Util');
const { shorten, formatNumberK } = require('../../util/Util');
module.exports = class SubredditCommand extends SubredditCommandBase {
constructor(client) {
@@ -32,7 +32,7 @@ module.exports = class SubredditCommand extends SubredditCommandBase {
.setImage(post.post_hint === 'image' ? post.url : null)
.setURL(`https://www.reddit.com${post.permalink}`)
.setTimestamp(post.created_utc * 1000)
.setFooter(`${formatNumber(post.score)}`);
.setFooter(`${formatNumberK(post.score)}`);
if (post.thumbnail && post.thumbnail !== 'self' && post.post_hint !== 'image') {
embed.setThumbnail(post.thumbnail);
}