Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client.on('message',async msg => {
- var prifex = "!"
- if(msg.content.startsWith(prefix + "setdate")) {
- if(!msg.guild.member(msg.author).hasPermissions('MANAGE_CHANNELS')) return msg.reply('❌ **go play minecraft**');
- if(!msg.guild.member(bot.user).hasPermissions(['MANAGE_CHANNELS'])) return msg.reply('❌ **البوت لا يمتلك صلاحية**');
- msg.guild.createChannel(`date :[]` , 'voice').then(time => {
- time.overwritePermissions(msg.guild.id, {
- CONNECT: false,
- SPEAK: false
- });
- setInterval(() => {
- var currentTime = new Date(),
- Year = currentTime.getFullYear(),
- Month = currentTime.getMonth() + 1,
- Dat = currentTime.getDate()
- time.setName(`Date : [${Year} - ${Month} - ${Dat}]`);
- },1000);
- });
- }
- });
- client.on('message',async msg => {
- if(msg.content.startsWith(prefix + "settimeegy")) {
- if(!msg.guild.member(msg.author).hasPermissions('MANAGE_CHANNELS')) return msg.reply('❌ **go play minecraft**');
- if(!msg.guild.member(bot.user).hasPermissions(['MANAGE_CHANNELS'])) return msg.reply('❌ **البوت لا يمتلك صلاحية**');
- msg.guild.createChannel(`Time :[]` , 'voice').then(time => {
- time.overwritePermissions(msg.guild.id, {
- CONNECT: false,
- SPEAK: false
- });
- setInterval(() => {
- var currentTime = new Date(),
- hours = currentTime.getHours() + 2 ,
- minutes = currentTime.getMinutes(),
- Seconds = currentTime.getSeconds()
- if (minutes < 10) {
- minutes = "0" + minutes;
- }
- var suffix = "AM";
- if (hours >= 12) {
- suffix = "PM";
- hours = hours - 12;
- }
- if (hours == 0) {
- hours = 12;
- }
- time.setName(`EGY Time :[${hours} : ${minutes} : ${Seconds} ${suffix}]`);
- },1000);
- });
- }
- });
- client.on('message',async msg => {
- if(msg.content.startsWith(prefix + "settimeuae")) {
- if(!msg.guild.member(msg.author).hasPermissions('MANAGE_CHANNELS')) return msg.reply('❌ **go play minecraft**');
- if(!msg.guild.member(bot.user).hasPermissions(['MANAGE_CHANNELS'])) return msg.reply('❌ **البوت لا يمتلك صلاحية**');
- msg.guild.createChannel(`Time :[]` , 'voice').then(time => {
- time.overwritePermissions(msg.guild.id, {
- CONNECT: false,
- SPEAK: false
- });
- setInterval(() => {
- var currentTime = new Date(),
- hours = currentTime.getHours() + 4 ,
- minutes = currentTime.getMinutes(),
- Seconds = currentTime.getSeconds()
- if (minutes < 10) {
- minutes = "0" + minutes;
- }
- var suffix = "AM";
- if (hours >= 12) {
- suffix = "PM";
- hours = hours - 12;
- }
- if (hours == 0) {
- hours = 12;
- }
- time.setName(`UAE Time :[${hours} : ${minutes} : ${Seconds} ${suffix}]`);
- },1000);
- });
- }
- });
- client.on('message',async msg => {
- if(msg.content.startsWith(prefix + "settimeiraq")) {
- if(!msg.guild.member(msg.author).hasPermissions('MANAGE_CHANNELS')) return msg.reply('❌ **go play minecraft**');
- if(!msg.guild.member(bot.user).hasPermissions(['MANAGE_CHANNELS'])) return msg.reply('❌ **البوت لا يمتلك صلاحية**');
- msg.guild.createChannel(`Time :[]` , 'voice').then(time => {
- time.overwritePermissions(msg.guild.id, {
- CONNECT: false,
- SPEAK: false
- });
- setInterval(() => {
- var currentTime = new Date(),
- hours = currentTime.getHours() + 3 ,
- minutes = currentTime.getMinutes(),
- Seconds = currentTime.getSeconds()
- if (minutes < 10) {
- minutes = "0" + minutes;
- }
- var suffix = "AM";
- if (hours >= 12) {
- suffix = "PM";
- hours = hours - 12;
- }
- if (hours == 0) {
- hours = 12;
- }
- time.setName(`IRAQ Time :[${hours} : ${minutes} : ${Seconds} ${suffix}]`);
- },1000);
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement