Advertisement
AcTCrAFT2004

Status-Bot

Feb 15th, 2020
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. client.on('voiceStateUpdate', (old, now) => {
  2.   const channel = client.channels.get('506697718454943744'); // ايدي روم صوتي
  3.   const currentSize = channel.guild.members.filter(m => m.voiceChannel).size;
  4.   const size = channel.name.match(/\[\s(\d+)\s\]/);
  5.   if (!size) return channel.setName(`Voice Online: [ ${currentSize} ]`);
  6.   if (currentSize !== size) channel.setName(`Voice Online: [ ${currentSize} ]`);
  7. });
  8.  
  9. client.on('voiceStateUpdate', (old, now) => {
  10.   const channel = client.channels.get('506697786209861644'); // ايدي روم صوتي
  11.   const currentSize = client.guild.memberCount
  12.   const size = channel.name.match(/\[\s(\d+)\s\]/);
  13.   if (!size) return channel.setName(`Member Count: [ ${currentSize} ]`);
  14.   if (currentSize !== size) channel.setName(`Member Count: [ ${currentSize} ]`);
  15. });
  16.  
  17.  
  18. client.on('voiceStateUpdate', (old, now) => {
  19.       var currentTime = new Date(),
  20.       years = currentTime.getFullYear(),
  21.       month = currentTime.getMonth() + 1,
  22.       day = currentTime.getDate(),
  23.       week = currentTime.getDay();
  24.   const channel = client.channels.get('506699166018174977'); // ايدي روم صوتي
  25.   const currentSize = "「" + day + "-" + month + "-" + years + "」"
  26.   const size = channel.name.match(/\[\s(\d+)\s\]/);
  27.   if (!size) return channel.setName(`Date: [ ${currentSize} ]`);
  28.   if (currentSize !== size) channel.setName(`Date: [ ${currentSize} ]`);
  29. });
  30.  
  31. client.on('voiceStateUpdate', (old, now) => {
  32.     setInterval(function() {
  33.  
  34.         var currentTime = new Date(),
  35.         hours = currentTime.getHours() + 3 ,
  36.         minutes = currentTime.getMinutes(),
  37.         seconds = currentTime.getSeconds(),
  38.         years = currentTime.getFullYear(),
  39.         month = currentTime.getMonth(),
  40.         day = currentTime.getDate(),
  41.         week = currentTime.getDay();
  42.  
  43.         if (minutes < 10) {
  44.             minutes = "0" + minutes;
  45.         }
  46.         var suffix = "AM";
  47.         if (hours >= 12) {
  48.             suffix = "PM";
  49.             hours = hours - 12;
  50.         }
  51.         if (hours == 0) {
  52.             hours = 12;
  53.         }
  54.  
  55.     const channel = client.channels.get('506699272318746625'); // ايدي روم صوتي
  56.     const currentSize = "「" + hours + ":" + minutes  +" " + suffix + "」"
  57.     const size = channel.name.match(/\[\s(\d+)\s\]/);
  58.     if (!size) return channel.setName(`Time: [ ${currentSize} ]`);
  59.     if (currentSize !== size) channel.setName(`Time: [ ${currentSize} ]`);
  60.   });
  61.  
  62. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement