You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Haha-Yes/commands/utility/server.js

36 lines
922 B
JavaScript

const { Command } = require('discord-akairo');
class ServerCommand extends Command {
constructor() {
super('server', {
aliases: ['server', 'serverinfo'],
category: 'utility',
channelRestriction: 'guild',
description: {
content: 'Show info about the server',
usage: '',
examples: ['']
}
});
}
async exec(message) {
const customresponse = require(`../tag/${message.guild.id}.json`);
var count = Object.keys(customresponse).length;
const addEmbed = {
color: 0x0099ff,
title: 'Stats of the server',
thumbnail: {
url: `${message.guild.iconURL}`,
},
description: `Member: **${message.guild.memberCount}** \nChannel number: **${message.guild.channels.size}**\nGuild created at **${message.guild.createdAt}**\nOwner: **${message.guild.owner}**\nTag number: **${count}**`,
};
message.channel.send({ embed: addEmbed });
}
}
module.exports = ServerCommand;