mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 08:17:35 +02:00
22.0.0
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { stripIndents } = require('common-tags');
|
||||
const moment = require('moment');
|
||||
require('moment-duration-format');
|
||||
const filterLevels = ['Off', 'No Role', 'Everyone'];
|
||||
|
||||
module.exports = class GuildInfoCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -21,22 +20,21 @@ module.exports = class GuildInfoCommand extends Command {
|
||||
const embed = new RichEmbed()
|
||||
.setColor(0x00AE86)
|
||||
.setThumbnail(msg.guild.iconURL())
|
||||
.addField('Name',
|
||||
.addField('❯ Name',
|
||||
msg.guild.name, true)
|
||||
.addField('ID',
|
||||
.addField('❯ ID',
|
||||
msg.guild.id, true)
|
||||
.addField('Creation Date',
|
||||
stripIndents`
|
||||
${moment(msg.guild.createdTimestamp).format('MMMM Do YYYY h:mm:ss A')}
|
||||
${moment.duration(Date.now() - msg.guild.createdTimestamp).format('y[ years], M[ months], w[ weeks, and ]d[ days]')} ago.
|
||||
`)
|
||||
.addField('Default Channel',
|
||||
.addField('❯ Creation Date',
|
||||
moment(msg.guild.createdAt).format('MMMM Do YYYY'), true)
|
||||
.addField('❯ Default Channel',
|
||||
msg.guild.defaultChannel, true)
|
||||
.addField('Region',
|
||||
.addField('❯ Region',
|
||||
msg.guild.region, true)
|
||||
.addField('Owner',
|
||||
.addField('❯ Explicit Filter',
|
||||
filterLevels[msg.guild.explicitContentFilter], true)
|
||||
.addField('❯ Owner',
|
||||
msg.guild.owner, true)
|
||||
.addField('Members',
|
||||
.addField('❯ Members',
|
||||
msg.guild.memberCount, true);
|
||||
return msg.embed(embed);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user