utility.guildinfo: fixes and rearranging
This commit is contained in:
parent
877398686b
commit
74ee9c15f9
1 changed files with 19 additions and 25 deletions
|
@ -1813,6 +1813,16 @@ guildinfo.callback = async function (msg, line) {
|
|||
title: guild.name,
|
||||
description: guild.description ?? "*No description.*",
|
||||
fields: [
|
||||
guild.ownerID && {
|
||||
name: "Owner",
|
||||
value: `<@${guild.ownerID}>`,
|
||||
inline: true,
|
||||
},
|
||||
guild.vanityURL && {
|
||||
name: "Vanity URL",
|
||||
value: `https://discord.gg/${guild.vanityURL}`,
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: "Created",
|
||||
value: `<t:${Math.floor(snowflakeToTimestamp(guild.id) / 1000)}:R>`,
|
||||
|
@ -1834,7 +1844,7 @@ guildinfo.callback = async function (msg, line) {
|
|||
inline: true,
|
||||
},
|
||||
{
|
||||
name: "Explicit Content Filter Level",
|
||||
name: "Content Filter",
|
||||
value: GUILD_CONTENT_FILTER[guild.explicitContentFilter],
|
||||
inline: true,
|
||||
},
|
||||
|
@ -1867,8 +1877,8 @@ guildinfo.callback = async function (msg, line) {
|
|||
Object.entries(channelTypeCounts)
|
||||
.map(([type, count]) => `${count} ${CHANNEL_TYPE_NAMES[type]}`)
|
||||
.join(", ") +
|
||||
`\n\n${nsfwChannels} age restricted, ${hiddenChannels} hidden`,
|
||||
inline: true,
|
||||
`\n${nsfwChannels} age restricted, ${hiddenChannels} hidden`,
|
||||
inline: false,
|
||||
},
|
||||
{
|
||||
name: `Roles (${guild.roles.size})`,
|
||||
|
@ -1905,7 +1915,7 @@ guildinfo.callback = async function (msg, line) {
|
|||
} unavailable`,
|
||||
inline: true,
|
||||
},
|
||||
],
|
||||
].filter((x) => !!x),
|
||||
};
|
||||
|
||||
if (guild.icon) {
|
||||
|
@ -1918,25 +1928,9 @@ guildinfo.callback = async function (msg, line) {
|
|||
};
|
||||
}
|
||||
|
||||
if (guild.ownerID) {
|
||||
embed.fields.push({
|
||||
name: "Owner",
|
||||
value: `<@${guild.ownerID}>`,
|
||||
inline: true,
|
||||
});
|
||||
}
|
||||
|
||||
if (guild.vanityURL) {
|
||||
embed.fields.push({
|
||||
name: "Vanity URL",
|
||||
value: `https://discord.gg/${guild.vanityURL}`,
|
||||
inline: true,
|
||||
});
|
||||
}
|
||||
|
||||
if (guild.systemChannelID) {
|
||||
embed.fields.push({
|
||||
name: "System Messages Channel",
|
||||
name: "System Messages",
|
||||
value: `#${guild.channels.get(guild.systemChannelID).name} (\`${
|
||||
guild.systemChannelID
|
||||
}\`)`,
|
||||
|
@ -1945,7 +1939,7 @@ guildinfo.callback = async function (msg, line) {
|
|||
}
|
||||
if (guild.rulesChannelID) {
|
||||
embed.fields.push({
|
||||
name: "Rules Channel",
|
||||
name: "Rules",
|
||||
value: `#${guild.channels.get(guild.rulesChannelID).name} (\`${
|
||||
guild.rulesChannelID
|
||||
}\`)`,
|
||||
|
@ -1954,7 +1948,7 @@ guildinfo.callback = async function (msg, line) {
|
|||
}
|
||||
if (guild.publicUpdatesChannelID) {
|
||||
embed.fields.push({
|
||||
name: "Community Updates Channel",
|
||||
name: "Community Updates",
|
||||
value: `#${
|
||||
guild.channels.get(guild.publicUpdatesChannelID).name
|
||||
} (\`${guild.publicUpdatesChannelID}\`)`,
|
||||
|
@ -1963,7 +1957,7 @@ guildinfo.callback = async function (msg, line) {
|
|||
}
|
||||
if (guild.safetyAlertsChannelID) {
|
||||
embed.fields.push({
|
||||
name: "Safety Alerts Channel",
|
||||
name: "Safety Alerts",
|
||||
value: `#${guild.channels.get(guild.safetyAlertsChannelID).name} (\`${
|
||||
guild.safetyAlertsChannelID
|
||||
}\`)`,
|
||||
|
@ -1977,7 +1971,7 @@ guildinfo.callback = async function (msg, line) {
|
|||
).length;
|
||||
const bots = members.filter((member) => member.bot).length;
|
||||
const verfifiedBots = members.filter(
|
||||
(member) => member.bot && (member.user.flags & 65536) != 0
|
||||
(member) => member.bot && (member.user.publicFlags & 65536) != 0
|
||||
).length;
|
||||
embed.fields.push({
|
||||
name: "Member Count",
|
||||
|
|
Loading…
Reference in a new issue