server info discord js

Solutions on MaxInterview for server info discord js by the best coders in the world

showing results for - "server info discord js"
Salvatore
13 Aug 2018
1client.on('message', message => {
2    if (message.content.toLowerCase().startsWith(prefix + 'server')) {
3        if (UtilCommandsDisable.has(message.guild.id)) {
4            message.channel.send("**Util Commands are Disabled in This Server**")
5        } else if (!UtilCommandsDisable.has(message.guild.id)) {
6            const ServerLogo = message.guild.iconURL();
7            const ServerInfoEmbed = new Discord.MessageEmbed()
8                .setColor('#b700ff')
9                .setTitle("Server Info")
10                .setImage(ServerLogo)
11                .setDescription(`About **${message.guild}**`)
12                .addField("**Date Created**", `Server Created on **${message.guild.createdAt.toLocaleString()}**`)
13                .addField("**Owner**", `The Owner of This Server is ${message.guild.owner}`)
14                .addField("**Member Count**", "This Server Has ` " + `${message.guild.memberCount}` + " ` **Members**")
15                .addField("**Emoji Count**", "This Server Has ` " + `${message.guild.emojis.cache.size}` + " ` **Emojis**")
16                .addField("**Roles Count**", "This Server Has ` " + `${message.guild.roles.cache.size}` + " ` **Roles**")
17                .addField("**Channels Count**", "This Server Has ` " + `${message.guild.channels.cache.size}` + " ` **Channels**")
18                .addField("**Server Logo**", "**Downlaod Server Logo**")
19                .setURL(ServerLogo)
20            message.channel.send(ServerInfoEmbed)
21        }
22    }
23})