2018-09-16 21:02:11 +02:00
const { Command } = require ( 'discord.js-commando' ) ;
module . exports = class ServerCommand extends Command {
constructor ( client ) {
super ( client , {
name : 'server' ,
group : 'utility' ,
2018-09-18 02:18:54 +02:00
guildOnly : 'true' ,
2018-09-16 21:02:11 +02:00
memberName : 'server' ,
2018-09-18 02:18:54 +02:00
description : 'Show some stats about the server' ,
2018-09-21 14:03:07 +02:00
guildOnly : true ,
2018-09-16 21:02:11 +02:00
} ) ;
}
async run ( message ) {
2018-09-18 02:18:54 +02:00
const addEmbed = {
color : 0x0099ff ,
title : 'Stats of the server' ,
thumbnail : {
url : ` ${ message . guild . iconURL } ` ,
} ,
description : ` Member: ** ${ message . guild . memberCount } ** \n Channel number: ** ${ message . guild . channels . size } ** \n Guild created at ** ${ message . guild . createdAt } ** \n Owner: ** ${ message . guild . owner } ** ` ,
} ;
message . say ( { embed : addEmbed } ) ;
2018-09-16 21:02:11 +02:00
}
} ;