mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 14:43:05 -04:00
improve reddit page design
This commit is contained in:
parent
e3992bee38
commit
5b40e96f8f
1 changed files with 6 additions and 6 deletions
|
@ -23,6 +23,11 @@ function createRedditPage(context, result){
|
||||||
url: result.subreddit.link
|
url: result.subreddit.link
|
||||||
},
|
},
|
||||||
description: `**${link(result.post.link, result.post.title)}**`,
|
description: `**${link(result.post.link, result.post.title)}**`,
|
||||||
|
fields: [{
|
||||||
|
name: "",
|
||||||
|
value: `${icon("upvote")}${highlight(result.post.score)} ${icon("person")} ${link(result.author.link, `u/${result.author.name}`)}`,
|
||||||
|
inline: true
|
||||||
|
}],
|
||||||
footer: {
|
footer: {
|
||||||
iconUrl: STATICS.reddit,
|
iconUrl: STATICS.reddit,
|
||||||
text: `Reddit • ${context.application.name}`
|
text: `Reddit • ${context.application.name}`
|
||||||
|
@ -39,12 +44,7 @@ function createRedditPage(context, result){
|
||||||
awardData.push(`${icon(`reddit_${a}`)}${highlight(result.awards[a])}`)
|
awardData.push(`${icon(`reddit_${a}`)}${highlight(result.awards[a])}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(awardData.length >= 1) res.embeds[0].fields = [
|
if(awardData.length >= 1) res.embeds[0].description = res.embeds[0].description + `\n${awardData.join(' ')}`
|
||||||
{
|
|
||||||
name: 'Awards',
|
|
||||||
value: awardData.join(' ')
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue