Advertisement
Guest User

Untitled

a guest
Nov 20th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. client.on('message',async message => {
  2. if(message.content.startsWith("!uss")) {
  3. if(!message.guild.member(message.author).hasPermission('MANAGE_CHANNELS')) return message.reply('❌ **No Permissions No Command**');
  4. if(!message.guild.member(client.user).hasPermission(['MANAGE_CHANNELS','MANAGE_ROLES_OR_PERMISSIONS'])) return message.reply('❌ **I Dont have Perm**');
  5. message.channel.send('✅| **Room is Successfully Created **');
  6. message.guild.createChannel("🕐 - Time 00", 'voice').then((c) => {
  7. console.log(`Time channel setup for guild: \n ${message.guild.name}`);
  8. c.overwritePermissions(message.guild.id, {
  9. CONNECT: false,
  10. SPEAK: false
  11. });
  12. setInterval(function() {
  13.  
  14. var currentTime = new Date(),
  15. hours = currentTime.getHours() + 3 ,
  16. minutes = currentTime.getMinutes(),
  17. seconds = currentTime.getSeconds(),
  18. years = currentTime.getFullYear(),
  19. month = currentTime.getMonth(),
  20. day = currentTime.getDate(),
  21. week = currentTime.getDay();
  22.  
  23. if (minutes < 10) {
  24. minutes = "0" + minutes;
  25. }
  26. var suffix = "AM";
  27. if (hours >= 12) {
  28. suffix = "PM";
  29. hours = hours - 12;
  30. }
  31. if (hours == 0) {
  32. hours = 12;
  33. }
  34.  
  35. c.setName("🕐 - Time 「" + hours + ":" + minutes +" " + suffix + "」");
  36. },1000);
  37. });
  38. }
  39. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement