Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. bot.on("message", async msg => {
  2. if (msg.content.toLowerCase().startsWith(prefix)) {
  3. var args = msg.content.substring(prefix.length).split(" ");
  4. switch (args[0].toLowerCase()) {
  5. case "kick":
  6. if (msg.channel.type == "dm") {
  7. embed(
  8. msg,
  9. "Error",
  10. "This command cannot be used in direct messages",
  11. "#ffc0cb"
  12. );
  13. } else {
  14. var user = bot.guilds
  15. .get("627710463467061249")
  16. .members.get(msg.author.id);
  17. if (
  18. user.roles.has(627711487657508876) ||
  19. user.id == "570803493364039730"
  20. ) {
  21. if (args[1]) {
  22. var mention = msg.mentions.members.first();
  23. mention.kick();
  24. } else {
  25. embed(
  26. msg,
  27. "Error",
  28. "You have not provided the necessary information `userToKick mention`",
  29. "#ffc0cb"
  30. );
  31. }
  32. } else {
  33. embed(
  34. msg,
  35. "Error",
  36. "You do not have permission to run this command",
  37. "#ffc0cb"
  38. );
  39. }
  40. }
  41. }
  42. }
  43. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement