mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-06 06:10:49 +02:00
Prevent errors from thumbnail being "self"
This commit is contained in:
@@ -33,7 +33,9 @@ module.exports = class SubredditCommand extends SubredditCommandBase {
|
||||
.setURL(`https://www.reddit.com${post.permalink}`)
|
||||
.setTimestamp(post.created_utc * 1000)
|
||||
.setFooter(`⬆ ${formatNumber(post.score)}`);
|
||||
if (post.thumbnail && post.post_hint !== 'image') embed.setThumbnail(post.thumbnail);
|
||||
if (post.thumbnail && post.thumbnail !== 'self' && post.post_hint !== 'image') {
|
||||
embed.setThumbnail(post.thumbnail);
|
||||
}
|
||||
return embed;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user