SHARE
TWEET

information server - bot

MrWolf_1sT Feb 14th, 2020 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. client.on('message', message => {
  2.     if(message['content'].startsWith(prefix+"server")){
  3.         if(!message['author'].id == "516307527806484490")return message['channel'].send("You dont have permission.")//عشان ماحدا يستخد الامر غير الاونر
  4.         var id = message['content'].split(" ")[1];
  5.         if(!id)return message['channel'].send('Specify the server id.')
  6.         if(isNaN(id))return message['channel'].send('Only numbers.');
  7.         var guild = client.guilds.get(id);
  8.         if(!guild)return message['channel'].send("I cant find this guild.")
  9.         var embed = new Discord.RichEmbed()
  10.         .setColor('RANDOM')
  11.         .setTitle(`${guild.name}'s infomation`)
  12.        .addField('Name: ', guild.name, true)
  13.        .addField('ID: ', guild.id, true)
  14.        .addField('Owner: ', guild.owner.user.tag, true)
  15.        .addField('Members: ', guild.members.size, true)
  16.        .addField('channels: ', `${guild.channels.size}\ntext: ${guild.channels.filter(c => c.type == "text").size}\nvoice: ${guild.channels.filter(c => c.type == "voice").size}`, true)
  17.        .addField('createdAt: ', guild.createdAt, true)
  18.        message['channel'].send(embed);
  19.    }
  20. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top