Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bot.on("message", async msg => {
- if (msg.content.toLowerCase().startsWith(prefix)) {
- var args = msg.content.substring(prefix.length).split(" ");
- switch (args[0].toLowerCase()) {
- case "kick":
- if (msg.channel.type == "dm") {
- embed(
- msg,
- "Error",
- "This command cannot be used in direct messages",
- "#ffc0cb"
- );
- } else {
- var user = bot.guilds
- .get("627710463467061249")
- .members.get(msg.author.id);
- if (
- user.roles.has(627711487657508876) ||
- user.id == "570803493364039730"
- ) {
- if (args[1]) {
- var mention = msg.mentions.members.first();
- mention.kick();
- } else {
- embed(
- msg,
- "Error",
- "You have not provided the necessary information `userToKick mention`",
- "#ffc0cb"
- );
- }
- } else {
- embed(
- msg,
- "Error",
- "You do not have permission to run this command",
- "#ffc0cb"
- );
- }
- }
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement