mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 21:53:07 -04:00
update metadata to display in pills
This commit is contained in:
parent
0c54e15dfa
commit
f963520f49
2 changed files with 12 additions and 20 deletions
|
@ -1,6 +1,6 @@
|
|||
const { createEmbed, page, formatPaginationEmbeds } = require("../../../labscore/utils/embed");
|
||||
const { guildFeaturesField } = require("../../../labscore/utils/fields");
|
||||
const { icon, highlight, timestamp, codeblock } = require("../../../labscore/utils/markdown");
|
||||
const { icon, highlight, timestamp, codeblock, iconPill } = require("../../../labscore/utils/markdown");
|
||||
const { editOrReply } = require("../../../labscore/utils/message");
|
||||
|
||||
const { paginator } = require('../../../labscore/client');
|
||||
|
@ -34,23 +34,26 @@ module.exports = {
|
|||
|
||||
const g = context.guild
|
||||
// Guild Card
|
||||
|
||||
// Header Pills
|
||||
let pills = []
|
||||
pills.push(iconPill("user_multiple", context.guild.memberCount))
|
||||
if(g.premiumSubscriptionCount >= 1) pills.push(iconPill("boost", g.premiumSubscriptionCount))
|
||||
if(g.roles.length >= 2) pills.push(iconPill("user_shield", `${g.roles.length} Roles`))
|
||||
pills.push(`${icon("user_king")} <@${g.owner.id}>`)
|
||||
if(emojis.length >= 1) pills.push(iconPill("emoji", emojis.length))
|
||||
|
||||
let guildCard = createEmbed("default", context, {
|
||||
description: `${icon("home")} **${g.name}** ${highlight(`(${g.id})`)}\n\n${icon("calendar")} **Created at: **${timestamp(g.createdAt, "f")}\n${icon("user_shield")} **Roles: **${g.roles.length}\n${icon("user_multiple")} **Member Count: **${context.guild.memberCount}`,
|
||||
description: `${icon("home")} **${g.name}** ${highlight(`(${g.id})`)}\n${pills.join(' ')}\n\n${icon("calendar")} **Server created** ${timestamp(g.createdAt, "f")}`,
|
||||
fields: []
|
||||
})
|
||||
|
||||
if(context.guild.premiumSubscriptionCount >= 1) {
|
||||
guildCard.description += `\n${icon("boost")} **Server Boosts: **${context.guild.premiumSubscriptionCount} (Level ${context.message.guild.premiumTier})`
|
||||
}
|
||||
|
||||
if(g.iconUrl){
|
||||
guildCard.thumbnail = {
|
||||
url: g.iconUrl + `?size=4096`
|
||||
}
|
||||
}
|
||||
|
||||
if(g.owner) guildCard.description += `\n\n<:lc_guild_owner:674652779406426122> **Server Owner: **<@${g.owner.id}>`
|
||||
|
||||
// Channel Container
|
||||
let lines = [];
|
||||
if(textChannels >= 1) lines.push(`Text Channels ${textChannels}`)
|
||||
|
@ -69,18 +72,6 @@ module.exports = {
|
|||
inline: true
|
||||
})
|
||||
|
||||
// Emoji Container
|
||||
guildCard.fields.push({
|
||||
name: `${icon("emoji")} Emoji`,
|
||||
value: codeblock("py", [
|
||||
`Regular ${emojis.length - animojis}`,
|
||||
`Animated ${animojis}`,
|
||||
``,
|
||||
`Total ${emojis.length}`,
|
||||
]),
|
||||
inline: false
|
||||
})
|
||||
|
||||
if(g.banner){
|
||||
guildCard.image = {
|
||||
url: g.bannerUrl + "?size=4096"
|
||||
|
|
|
@ -103,6 +103,7 @@ module.exports.ICONS = Object.freeze({
|
|||
|
||||
"user": "<:ico_user:1165257795407466607>",
|
||||
"user_card": "<:ico_user_card:1165257796720275540>",
|
||||
"user_king": "<:ico_user_king:1226151423339663360>",
|
||||
"user_multiple": "<:ico_user_multiple:1165257798934876181>",
|
||||
"user_profile": "<:ico_user_profile:1165257800751001721>",
|
||||
"user_shield": "<:ico_user_shield:1165257802277728256>",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue