Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client.on ('message', async (revolution) => {
- if (!revolution.guild || revolution.author.bot) return false;
- var prefix = "!";
- switch (revolution.content.split(' ') [0]){
- case prefix+'server':
- var embed = new Discord.RichEmbed()
- .setColor ("RANDOM")
- .setTitle ("Server information")
- .addField ("Name: ", revolution.guild.name, true)
- .addField ("ID: ", revolution.guild.id, true)
- .addField ("Ownership: ", revolution.guild.owner, true)
- .addField ("Region: ", revolution.guild.region, true)
- .addField ("Members: ", revolution.guild.members.filter (member => !member.user.bot).size, true)
- .addField ("Bots: ", revolution.guild.members.filter (member => member.user.bot).size, true)
- .addField ("Channels: ", revolution.guild.channels.size, true)
- .addField ("Roles: ", revolution.guild.roles.size, true)
- revolution.channel.send (embed);
- break;
- case prefix+'user':
- var user = revolution.guild.member (revolution.mentions.members.first() || revolution.author);
- var embed = new Discord.RichEmbed()
- .setColor ("RANDOM")
- .setTitle ("User information")
- .addField ("Username: ", user.user.username, true)
- .addField ("ID: ", user.user.id, true)
- .addField ("CreatedAt: ", require ('moment')(user.user.createdAt).format("DD/MM/YYYY h:mm a"), true)
- .addField ("JoinedAt: ", require ('moment')(user.joinedAt).format("DD/MM/YYYY h:mm a"), true)
- .addField ("Roles: ", user.roles.filter (r => r.name !== "@everyone").map (m =>"<@&" +m.id+">").join("\n"), true)
- revolution.channel.send (embed);
- break;
- }
- });
- //By Rashwan || Revolution Codes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement