Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client.on('message',async message => {
- if(message.content.startsWith("!uss")) {
- if(!message.guild.member(message.author).hasPermission('MANAGE_CHANNELS')) return message.reply('❌ **No Permissions No Command**');
- if(!message.guild.member(client.user).hasPermission(['MANAGE_CHANNELS','MANAGE_ROLES_OR_PERMISSIONS'])) return message.reply('❌ **I Dont have Perm**');
- message.channel.send('✅| **Room is Successfully Created **');
- message.guild.createChannel("🕐 - Time 00", 'voice').then((c) => {
- console.log(`Time channel setup for guild: \n ${message.guild.name}`);
- c.overwritePermissions(message.guild.id, {
- CONNECT: false,
- SPEAK: false
- });
- setInterval(function() {
- var currentTime = new Date(),
- hours = currentTime.getHours() + 3 ,
- minutes = currentTime.getMinutes(),
- seconds = currentTime.getSeconds(),
- years = currentTime.getFullYear(),
- month = currentTime.getMonth(),
- day = currentTime.getDate(),
- week = currentTime.getDay();
- if (minutes < 10) {
- minutes = "0" + minutes;
- }
- var suffix = "AM";
- if (hours >= 12) {
- suffix = "PM";
- hours = hours - 12;
- }
- if (hours == 0) {
- hours = 12;
- }
- c.setName("🕐 - Time 「" + hours + ":" + minutes +" " + suffix + "」");
- },1000);
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement