mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-15 15:57:47 +02:00
Get Subreddit Icons in Meme and Subreddit Commands
This commit is contained in:
@@ -13,6 +13,7 @@ module.exports = class MemeCommand extends SubredditCommand {
|
||||
details: `**Subreddits:** ${subreddits.join(', ')}`,
|
||||
clientPermissions: ['ATTACH_FILES'],
|
||||
postType: 'image',
|
||||
getIcon: true,
|
||||
args: [
|
||||
{
|
||||
key: 'subreddit',
|
||||
@@ -29,7 +30,7 @@ module.exports = class MemeCommand extends SubredditCommand {
|
||||
generateText(post, subreddit) {
|
||||
return new MessageEmbed()
|
||||
.setColor(0xFF4500)
|
||||
.setAuthor(`r/${subreddit}`, 'https://i.imgur.com/DSBOK0P.png', `https://www.reddit.com/r/${subreddit}/`)
|
||||
.setAuthor(`r/${subreddit}`, post.icon, `https://www.reddit.com/r/${subreddit}/`)
|
||||
.setTitle(post.title)
|
||||
.setImage(post.post_hint === 'image' ? post.url : null)
|
||||
.setURL(`https://www.reddit.com${post.permalink}`)
|
||||
|
||||
Reference in New Issue
Block a user