mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 05:49:49 +02:00
Add thumbnails to subreddit
This commit is contained in:
@@ -29,8 +29,9 @@ module.exports = class SubredditCommand extends SubredditCommandBase {
|
||||
.setAuthor(`r/${subreddit}`, icon, `https://www.reddit.com/r/${subreddit}/`)
|
||||
.setTitle(post.title)
|
||||
.setImage(post.post_hint === 'image' ? post.url : null)
|
||||
.setThumbnail(post.post_hint === 'image' ? null : post.thumbnail)
|
||||
.setURL(`https://www.reddit.com${post.permalink}`)
|
||||
.setTimestamp(post.created_utc * 1000)
|
||||
.setFooter(`⬆ ${formatNumber(post.ups)}`);
|
||||
.setFooter(`⬆ ${formatNumber(post.score)}`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user