diff --git a/commands/message/info/guild.js b/commands/message/info/guild.js index d8fdc90..54e7077 100644 --- a/commands/message/info/guild.js +++ b/commands/message/info/guild.js @@ -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 diff --git a/commands/message/info/guildicon.js b/commands/message/info/guildicon.js index 290e88c..81e9334 100644 --- a/commands/message/info/guildicon.js +++ b/commands/message/info/guildicon.js @@ -13,7 +13,8 @@ module.exports = { }, run: async (context) => { context.triggerTyping(); - editOrReply(context, { + if(!context.guild.iconUrl) return editOrReply(context, createEmbed("warning", context, "Server doesn't have an icon.")) + return editOrReply(context, { embeds: [createEmbed("default", context, { image: { url: context.guild.iconUrl + "?size=4096" diff --git a/commands/message/info/invite.js b/commands/message/info/invite.js index 98b8fcd..675bde3 100644 --- a/commands/message/info/invite.js +++ b/commands/message/info/invite.js @@ -32,12 +32,15 @@ module.exports = { // Guild Card let inviteCard = createEmbed("default", context, { description: `${icon("link")} **https://discord.gg/${inviteCode[1]}**\n\n​${icon("house")} **${g.name}** ${highlight(`(${g.id})`)}\n${icon("calendar")} **Created at: **${timestamp(g.createdAt, "f")}\n\n${icon("people")}${highlight(invite.approximateMemberCount.toLocaleString())}​ ​ ​ ​ ​ ​ ${icon("online")}${highlight(invite.approximatePresenceCount.toLocaleString())}​ ​ ​ ${icon("offline")}${highlight((invite.approximateMemberCount - invite.approximatePresenceCount).toLocaleString())}`, - thumbnail: { - url: g.iconUrl + `?size=4096` - }, fields: [] }) + if(g.iconUrl){ + inviteCard.thumbnail = { + url: g.iconUrl + `?size=4096` + } + } + // Guild Features if(g.features.length >= 1){ let featureCards = guildFeaturesField(g)