2018-12-30 01:20:24 +01:00
|
|
|
const { Command } = require('discord-akairo');
|
2019-01-02 10:21:21 +01:00
|
|
|
const { MessageEmbed } = require('discord.js');
|
2018-12-25 19:17:07 +01:00
|
|
|
|
2018-12-30 01:20:24 +01:00
|
|
|
class ServerCommand extends Command {
|
2019-01-02 08:09:45 +01:00
|
|
|
constructor() {
|
|
|
|
super('server', {
|
|
|
|
aliases: ['server', 'serverinfo'],
|
|
|
|
category: 'utility',
|
|
|
|
channelRestriction: 'guild',
|
|
|
|
description: {
|
2018-12-30 01:20:24 +01:00
|
|
|
content: 'Show info about the server',
|
|
|
|
usage: '',
|
|
|
|
examples: ['']
|
|
|
|
}
|
2019-01-02 08:09:45 +01:00
|
|
|
});
|
|
|
|
}
|
2018-09-16 21:02:11 +02:00
|
|
|
|
2019-01-02 08:09:45 +01:00
|
|
|
async exec(message) {
|
2019-01-02 10:21:21 +01:00
|
|
|
const customresponse = require(`../../tag/${message.guild.id}.json`);
|
2019-01-02 08:09:45 +01:00
|
|
|
var count = Object.keys(customresponse).length;
|
|
|
|
|
2019-01-02 10:21:21 +01:00
|
|
|
const addEmbed = new MessageEmbed()
|
|
|
|
.setColor('#0099ff')
|
|
|
|
.setTitle('Stats of the server')
|
|
|
|
.setAuthor(message.author.username)
|
|
|
|
.setDescription(`Member: **${message.guild.memberCount}** \nChannel number: **${message.guild.channels.size}**\nGuild created at **${message.guild.createdAt}**\nOwner: **${message.guild.owner}**\nTag number: **${count}**`)
|
|
|
|
.setTimestamp();
|
|
|
|
|
|
|
|
|
2019-01-02 08:09:45 +01:00
|
|
|
|
|
|
|
message.channel.send({ embed: addEmbed });
|
|
|
|
}
|
2018-12-30 01:20:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = ServerCommand;
|