Discord-Bot/src/commands/guild/info.js
2022-12-12 10:43:02 +01:00

140 lines
No EOL
3.9 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const Discord = require('discord.js');
module.exports = async (client, interaction, args) => {
let verifLevels = {
"NONE": "None",
"LOW": "Low",
"MEDIUM": "Medium",
"HIGH": "(╯°□°)╯︵ ┻━┻",
"VERY_HIGH": "┻━┻ミヽ(ಠ益ಠ)ノ彡┻━┻"
}
let region = {
"brazil": `:flag_br: `,
"eu-central": `:flag_eu: `,
"singapore": `:flag_sg: `,
"us-central": `:flag_us: `,
"sydney": `:flag_au: `,
"us-east": `:flag_us: `,
"us-south": `:flag_us: `,
"us-west": `:flag_us: `,
"eu-west": `:flag_eu: `,
"vip-us-east": `:flag_us: `,
"europe": `:flag_gb:`,
"amsterdam": `:flag_nl:`,
"hongkong": `:flag_hk: `,
"russia": `:flag_ru: `,
"southafrica": `:flag_za: `
}
let tier = {
"TIER_1": `1`,
"TIER_2": `2`,
"TIER_3": `3`,
"NONE": `0`,
}
const members = await interaction.guild.members.fetch();
client.embed({
title: `・Server Information`,
desc: `Information about the server ${interaction.guild.name}`,
thumbnail: interaction.guild.iconURL({ dynamic: true, size: 1024 }),
image: interaction.guild.bannerURL({ size: 1024 }),
fields: [
{
name: "Server name:",
value: `${interaction.guild.name}`,
inline: true,
},
{
name: "Server id:",
value: `${interaction.guild.id}`,
inline: true,
},
{
name: "Owner: ",
value: `<@!${interaction.guild.ownerId}>`,
inline: true
},
{
name: "Verify level: ",
value: `${verifLevels[interaction.guild.verificationLevel]}`,
inline: true
},
{
name: "Boost tier: ",
value: `Tier ${tier[interaction.guild.premiumTier] || 'None'}`,
inline: true
},
{
name: "Boost count:",
value: `${interaction.guild.premiumSubscriptionCount || '0'} boosts`,
inline: true
},
{
name: "Created on:",
value: `<t:${Math.round(interaction.guild.createdTimestamp / 1000)}>`,
inline: true
},
{
name: "Members:",
value: `${interaction.guild.memberCount} members!`,
inline: true
},
{
name: "Bots:",
value: `${members.filter(member => member.user.bot).size} bots!`,
inline: true
},
{
name: "Text Channels: ",
value: `${interaction.guild.channels.cache.filter(channel => channel.type === Discord.ChannelType.GuildText).size} channels!`,
inline: true
},
{
name: "Voice Channels:",
value: `${interaction.guild.channels.cache.filter(channel => channel.type === Discord.ChannelType.GuildVoice).size} channels!`,
inline: true
},
{
name: "Stage Channels:",
value: `${interaction.guild.channels.cache.filter(channel => channel.type === Discord.ChannelType.GuildStageVoice).size} channels!`,
inline: true
},
{
name: "News Channels:",
value: `${interaction.guild.channels.cache.filter(channel => channel.type === Discord.ChannelType.GuildAnnouncement).size} channels!`,
inline: true
},
{
name: "Public Threads:",
value: `${interaction.guild.channels.cache.filter(channel => channel.type === 'GUILD_PUBLIC_THREAD').size} threads!`,
inline: true
},
{
name: "Private Threads:",
value: `${interaction.guild.channels.cache.filter(channel => channel.type === 'GUILD_PRIVATE_THREAD').size} threads!`,
inline: true
},
{
name: "Roles:",
value: `${interaction.guild.roles.cache.size} roles!`,
inline: true
},
{
name: "Emoji count:",
value: `${interaction.guild.emojis.cache.size} emoji's`,
inline: true
},
{
name: "Sticker count:",
value: `${interaction.guild.stickers.cache.size} stickers`,
inline: true
}
],
type: 'editreply'
}, interaction)
}