DY_YT

Aoi.js 2 ban and unban

Jun 24th, 2021 (edited)
965
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. bot.command({
  2.  name:"ban",
  3.  code: `
  4. $color[BLUE]
  5. $author[👌: Banned successfully]
  6. $addField[About:;
  7. Reason:
  8. > $replaceText[$replaceText[$checkCondition[$messageSlice[1]==];true;A reason wasn't provided.];false;$messageSlice[1]]
  9. Date:
  10. > $day $month $year
  11. ]
  12. $addField[User information;
  13. $userTag[$findUser[$message[1]]] - $findUser[$message[1]]]
  14. $addField[Moderator;
  15. $userTag - $authorID]
  16. $thumbnail[$userAvatar[$findUser[$message[1]]]]
  17. $ban[$findUser[$message[1]];$userTag: $replaceText[$replaceText[$checkCondition[$messageSlice[1]==];true;A reason wasn't provided.];false;$messageSlice[1]];7]
  18. $if[$memberExists[$findUser[$message[1]]]==true]
  19. $onlyIf[$rolePosition[$highestRole[$findUser[$message[1]]]]>$rolePosition[$highestRole]; To use this you need to have a higher rank than the mentioned user.]
  20. $onlyIf[$findUser[$message[1]]!=$authorID; You can't ban yourself (Or else, I couldn't find that user)]
  21. $onlyIf[$findUser[$message[1]]!=$clientID;I can't ban myself, how can it possible]
  22. $onlyIf[$findUser[$message[1]]!=$ownerID; I can't ban the owner of the server]
  23. $elseIf[$memberExists[$findUser[$message[1]]]==false]
  24. $onlyIf[$findUser[$message[1]]!=$authorID; You can't ban yourself (Or else, I couldn't find that user)]
  25. $endelseIf
  26. $endif
  27. $onlyIf[$isBanned[$findUser[$message[1]]]==false;This user has already been banned on this server]
  28. $onlyIf[$message!=;: Please specify the user you want to ban. Correct usage: \`$getServerVar[prefix]ban <@User> [Reason\\]\`]
  29. $onlyPerms[ban;To use this you require the \`BAN_MEMBERS\` permission]
  30.  $onlyBotPerms[ban; I don't have enough perms to execute this command. Permissions missing :\`BAN_MEMBERS\`]`
  31. })
  32.  
  33.  
  34.  
  35. bot.command({
  36. name: "unban",
  37. code: `$unban[$message[1];By $userTag[$authorID] Reason: $sliceMessage[1]]
  38. $username[$message[1]] **has been unbanned 👌**
  39. $onlyBotPerms[ban; I don't have ban perms]
  40. $argsCheck[>1; Please Provide User ID To Unban**]
  41. $onlyPerms[ban; You need ban permission]
  42. $suppressErrors[I can't find that user]`
  43. })
Advertisement
Add Comment
Please, Sign In to add comment