fix errors for guilds with no icon

This commit is contained in:
derpystuff 2023-04-23 15:10:47 +02:00
parent 615fd4bc82
commit 27bc88ea15
3 changed files with 14 additions and 7 deletions

View file

@ -31,12 +31,15 @@ module.exports = {
// Guild Card
let guildCard = createEmbed("default", context, {
description: `${icon("house")} **${g.name}** ${highlight(`(${g.id})`)}\n\n${icon("calendar")} **Created at: **${timestamp(g.createdAt, "f")}`,
thumbnail: {
url: g.iconUrl + `?size=4096`
},
fields: []
})
if(g.iconUrl){
inviteCard.thumbnail = {
url: g.iconUrl + `?size=4096`
}
}
if(g.owner) guildCard.description += `\n\n<:lc_guild_owner:674652779406426122> **Server Owner: **<@${g.owner.id}>`
// Channel Container