mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 14:43:05 -04:00
change to displaying assets
This commit is contained in:
parent
d1c375379e
commit
f7a9fd9240
1 changed files with 4 additions and 2 deletions
|
@ -101,7 +101,6 @@ module.exports = {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(application.tags){
|
if(application.tags){
|
||||||
console.log(application.tags)
|
|
||||||
embed.fields.push({
|
embed.fields.push({
|
||||||
name: `${icon("list")} Tags`,
|
name: `${icon("list")} Tags`,
|
||||||
value: application.tags.map(t => highlight(t + '')).join(', '),
|
value: application.tags.map(t => highlight(t + '')).join(', '),
|
||||||
|
@ -138,7 +137,10 @@ module.exports = {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(assets.length){
|
if(assets.length){
|
||||||
let asset = assets.map(a => link(`https://cdn.discordapp.com/app-assets/${application.id}/${a.id}.png?size=4096`, a.name.substr(0,25)))
|
let asset = assets.map(a => {
|
||||||
|
if(a.name.length >= 25) return link(`https://cdn.discordapp.com/app-assets/${application.id}/${a.id}.png?size=4096`, a.name.substr(0,23) + '...')
|
||||||
|
return link(`https://cdn.discordapp.com/app-assets/${application.id}/${a.id}.png?size=4096`, a.name.substr(0,23))
|
||||||
|
})
|
||||||
if(asset.length >= 6) asset[5] = link(`https://canary.discord.com/api/oauth2/applications/${application.id}/assets`, `View ${asset.length - 6} remaining assets`)
|
if(asset.length >= 6) asset[5] = link(`https://canary.discord.com/api/oauth2/applications/${application.id}/assets`, `View ${asset.length - 6} remaining assets`)
|
||||||
embed.fields.push({
|
embed.fields.push({
|
||||||
name: `${icon("image")} Assets`,
|
name: `${icon("image")} Assets`,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue