Created
June 10, 2018 04:12
-
-
Save ItzMeDwii/a127107f71d16529e9404ec973fc1729 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Discord = require("discord.js"); | |
| const dateFormat = require('dateformat'); | |
| exports.run = (client, message, args, tools) => { | |
| const now = new Date(); | |
| dateFormat(now, '***On dddd, mmmm dS, yyyy, h:MM:ss TT***'); | |
| let region = { | |
| "brazi": "**Brazil** :flag_br:", | |
| "eu-central": "**Central Europe** :flag_eu:", | |
| "singapore": "**Singapore** :flag_sg:", | |
| "us-central": "**U.S. Central** :flag_us:", | |
| "sydney": "**Sydney** :flag_au:", | |
| "us-east": "**U.S. East** :flag_us:", | |
| "us-south": "**U.S. South** :flag_us:", | |
| "us-west": "**U.S. West** :flag_us:", | |
| "eu-west": "**Western Europe** :flag_eu:", | |
| "singapore": "**Singapore** :flag_sg:", | |
| "london": "**London** :flag_gb:", | |
| "japan": "**Japan** :flag_jp:", | |
| "russia": "**Russia** :flag_ru:", | |
| "hongkong": "**Hong Kong** :flag_hk:" | |
| } | |
| let icon; | |
| if (message.guild.iconURL) { | |
| icon = message.guild.iconURL | |
| } | |
| if (!message.guild.iconURL) { | |
| icon = "https://upload.wikimedia.org/wikipedia/commons/thumb/0/09/Blue_computer_icon.svg/2000px-Blue_computer_icon.svg.png" | |
| } | |
| let owner = message.guild.owner.user | |
| if (!owner) { | |
| owner = "None for some reason..." | |
| }; | |
| const millis = new Date().getTime() - message.guild.createdAt.getTime(); | |
| const days = millis / 1000 / 60 / 60 / 24; | |
| const verificationLevels = ['**None**', '**Low**', '**Medium**', '**(╯°□°)╯︵ ┻━┻** (High)', '**┻━┻彡 ヽ(ಠ益ಠ)ノ彡┻━┻** (Extreme)']; | |
| function generateHex() { | |
| return '#'+ Math.floor(Math.random() * 16777215).toString(16); | |
| } | |
| const embed = new Discord.RichEmbed() | |
| .setColor(generateHex()) | |
| .setTitle(`Owned by ${message.guild.owner.user.tag} / ${message.guild.ownerID}`) | |
| .setDescription(`${message.guild}`) | |
| .setFooter("© PUBGMID | by ItzMeDwii") | |
| .setThumbnail(`${message.guild.iconURL}`, true) | |
| .setTimestamp() | |
| .addField("Channels:", `• ${message.guild.channels.size}`, true) | |
| .addField("Members:", `• **[${message.guild.members.size}]**`, true) | |
| .addField("Region:", `• ${region[message.guild.region]}`, true) | |
| .addField("ID:", `• ${message.guild.id}`, true) | |
| .addField("Verification Level:", `• ${verificationLevels[message.guild.verificationLevel]}`, true) | |
| .addField("Created At:", `• ${dateFormat(message.guild.createdAt)}`, true) | |
| .addField("Roles:", `• ${message.guild.roles.array().join(" | ")}`, true) | |
| message.channel.send({embed}) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment