Advertisement
Guest User

teat

a guest
Feb 19th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.60 KB | None | 0 0
  1.  
  2.  
  3. client.on('message',async msg => {
  4. var prifex = "!"
  5.  
  6. if(msg.content.startsWith(prefix + "setdate")) {
  7. if(!msg.guild.member(msg.author).hasPermissions('MANAGE_CHANNELS')) return msg.reply('❌ **go play minecraft**');
  8. if(!msg.guild.member(bot.user).hasPermissions(['MANAGE_CHANNELS'])) return msg.reply('❌ **البوت لا يمتلك صلاحية**');
  9. msg.guild.createChannel(`date :[]` , 'voice').then(time => {
  10. time.overwritePermissions(msg.guild.id, {
  11. CONNECT: false,
  12. SPEAK: false
  13. });
  14. setInterval(() => {
  15. var currentTime = new Date(),
  16. Year = currentTime.getFullYear(),
  17. Month = currentTime.getMonth() + 1,
  18. Dat = currentTime.getDate()
  19. time.setName(`Date : [${Year} - ${Month} - ${Dat}]`);
  20. },1000);
  21. });
  22. }
  23.  
  24. });
  25.  
  26. client.on('message',async msg => {
  27. if(msg.content.startsWith(prefix + "settimeegy")) {
  28. if(!msg.guild.member(msg.author).hasPermissions('MANAGE_CHANNELS')) return msg.reply('❌ **go play minecraft**');
  29. if(!msg.guild.member(bot.user).hasPermissions(['MANAGE_CHANNELS'])) return msg.reply('❌ **البوت لا يمتلك صلاحية**');
  30. msg.guild.createChannel(`Time :[]` , 'voice').then(time => {
  31. time.overwritePermissions(msg.guild.id, {
  32. CONNECT: false,
  33. SPEAK: false
  34. });
  35. setInterval(() => {
  36. var currentTime = new Date(),
  37. hours = currentTime.getHours() + 2 ,
  38. minutes = currentTime.getMinutes(),
  39. Seconds = currentTime.getSeconds()
  40. if (minutes < 10) {
  41. minutes = "0" + minutes;
  42. }
  43. var suffix = "AM";
  44. if (hours >= 12) {
  45. suffix = "PM";
  46. hours = hours - 12;
  47. }
  48. if (hours == 0) {
  49. hours = 12;
  50. }
  51. time.setName(`EGY Time :[${hours} : ${minutes} : ${Seconds} ${suffix}]`);
  52. },1000);
  53. });
  54. }
  55.  
  56. });
  57.  
  58. client.on('message',async msg => {
  59.  
  60. if(msg.content.startsWith(prefix + "settimeuae")) {
  61. if(!msg.guild.member(msg.author).hasPermissions('MANAGE_CHANNELS')) return msg.reply('❌ **go play minecraft**');
  62. if(!msg.guild.member(bot.user).hasPermissions(['MANAGE_CHANNELS'])) return msg.reply('❌ **البوت لا يمتلك صلاحية**');
  63. msg.guild.createChannel(`Time :[]` , 'voice').then(time => {
  64. time.overwritePermissions(msg.guild.id, {
  65. CONNECT: false,
  66. SPEAK: false
  67. });
  68. setInterval(() => {
  69. var currentTime = new Date(),
  70. hours = currentTime.getHours() + 4 ,
  71. minutes = currentTime.getMinutes(),
  72. Seconds = currentTime.getSeconds()
  73. if (minutes < 10) {
  74. minutes = "0" + minutes;
  75. }
  76. var suffix = "AM";
  77. if (hours >= 12) {
  78. suffix = "PM";
  79. hours = hours - 12;
  80. }
  81. if (hours == 0) {
  82. hours = 12;
  83. }
  84. time.setName(`UAE Time :[${hours} : ${minutes} : ${Seconds} ${suffix}]`);
  85. },1000);
  86. });
  87. }
  88.  
  89. });
  90.  
  91.  
  92. client.on('message',async msg => {
  93.  
  94. if(msg.content.startsWith(prefix + "settimeiraq")) {
  95. if(!msg.guild.member(msg.author).hasPermissions('MANAGE_CHANNELS')) return msg.reply('❌ **go play minecraft**');
  96. if(!msg.guild.member(bot.user).hasPermissions(['MANAGE_CHANNELS'])) return msg.reply('❌ **البوت لا يمتلك صلاحية**');
  97. msg.guild.createChannel(`Time :[]` , 'voice').then(time => {
  98. time.overwritePermissions(msg.guild.id, {
  99. CONNECT: false,
  100. SPEAK: false
  101. });
  102. setInterval(() => {
  103. var currentTime = new Date(),
  104. hours = currentTime.getHours() + 3 ,
  105. minutes = currentTime.getMinutes(),
  106. Seconds = currentTime.getSeconds()
  107. if (minutes < 10) {
  108. minutes = "0" + minutes;
  109. }
  110. var suffix = "AM";
  111. if (hours >= 12) {
  112. suffix = "PM";
  113. hours = hours - 12;
  114. }
  115. if (hours == 0) {
  116. hours = 12;
  117. }
  118. time.setName(`IRAQ Time :[${hours} : ${minutes} : ${Seconds} ${suffix}]`);
  119. },1000);
  120. });
  121. }
  122.  
  123. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement