Advertisement
DoctorX13

XAdvancedReports

Dec 23rd, 2019
556
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. //Config DONT CHANGE ANY OF THIS!!
  2. bot_name = "|-----| TICKET |-----|";
  3. webhook_url = "INSERT_YOUR_WEBHOOKURL_HERE";
  4. bot_image = "https://www.iconninja.com/files/855/96/14/report-icon.png";
  5.  
  6. //Translation:
  7. report_correct = "You send the report correctly";
  8. report_error = "Correct Usage: /report {Target} {Reason}";
  9.  
  10. command report(target, reason){
  11. permission = "xar.report";
  12. execute(){
  13. if(isSet(target) and isSet(reason)){
  14. tt = toPlayer(target);
  15. if(isPlayer(tt)){
  16. discord.send(str.format("```Player: {0}
  17. Target: {1}
  18. Reason: {2}```", player.name, tt.name, reason), webhook_url, bot_name, bot_image);
  19. player.message(report_correct);
  20. }
  21. else {
  22. player.message(report_error);
  23. }
  24. }
  25. else {
  26. player.message(report_error);
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement