Advertisement
Fradix

كود وقت fradix

Jan 28th, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var prefix = "$";
  2. client.on('message', message => {
  3.          if (message.content === prefix + "وقت") {
  4.          if (!message.channel.guild) return message.reply('** This command only for servers **');  
  5.          var currentTime = new Date(),//حقوق FrAdIx
  6.             hours = currentTime.getHours() + 1 ,
  7.             hours2 = currentTime.getHours() + 3 ,
  8.             hours3 = currentTime.getHours() + 2,
  9.             minutes = currentTime.getMinutes(),
  10.             seconds = currentTime.getSeconds(),
  11.             Year = currentTime.getFullYear(),//حقوق FrAdIx
  12.             Month = currentTime.getMonth() + 1,
  13.             Day = currentTime.getDate();
  14.              var h = hours
  15.   if(hours > 12) {
  16.                hours -= 12;
  17.             } else if(hours == 0) {
  18.                 hours = "12";
  19.             }  
  20.              if(hours2 > 12) {
  21.                hours2 -= 12;
  22.             } else if(hours2 == 0) {
  23.                 hours2 = "12";
  24.            //حقوق FrAdIx
  25.             }  
  26.                          if(hours3 > 12) {
  27.                hours3 -= 12;
  28.             } else if(hours3 == 0) {
  29.                 hours3 = "12";
  30.             }
  31.             if (minutes < 10) {
  32.                 minutes = '0' + minutes;
  33.             }
  34.  
  35.             var suffix = 'صباحاَ';
  36.             if (hours >= 12) {
  37.                 suffix = 'مساء';
  38.                 hours = hours - 12;
  39.             }
  40.             if (hours == 0) {
  41.                 hours = 12;
  42.             }//حقوق FrAdIx
  43.  
  44.  
  45.                 var Date15= new Discord.RichEmbed()
  46.                 .setThumbnail("https://i.imgur.com/ib3n4Hq.png")
  47.                 .setTitle( "『التاريخ  والوقت』")
  48.                 .setColor('RANDOM')
  49.                 .setFooter(message.author.username, message.author.avatarURL)
  50.                 .addField('الجزائر',
  51.                 "『"+ hours + ":" + minutes +":"+ seconds + "』")
  52.                  .addField('مكه المكرمه',
  53.                 "『"+ hours2 + ":" + minutes +":"+ seconds  + "』")
  54.                 .addField('مصر',
  55.                 "『"+ hours3 + ":" + minutes +":"+ seconds  + "』")
  56.                
  57.                 .addField('Date',
  58.                 "『"+ Day + "-" + Month + "-" + Year +  "』")
  59.  
  60.                  message.channel.sendEmbed(Date15);
  61.         }
  62.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement