const fs = require('fs');
const version = require('../package.json').version;
const moment = require('moment-timezone');
const d = new Date();
const timeout = ms => new Promise(res => setTimeout(res, ms));
exports.run = (client, message, args) => {
  message.delete();

  fs.readFile('../token.txt', 'utf8', (err, data) => {
  if (err) throw err;
  var token = data;
});
  
  restart();

async function restart() {
  let response = await message.channel.send('\`S.Y.S.T.E.M. Shutting Down.....\`');
  await response.delete(1000);
  await client.destroy();
  await timeout(3000);
  await client.login(token);
  await client.user.setStatus('dnd');
  await client.user.setPresence( { game: {name: '御坂網絡 ' + 'Connecting', type: 2 }});
  let response1 = await message.channel.send('> \*\*[node.AI]\*\* watching: * -AIM- * \n> \*\*[node.AI]\*\* Starting AIwaz... \n> Loading.. \*\*MISAKA-NETWORK\*\* ' + '\`' + version + '\`')
  await response1.delete(5000);
  let response2 = await message.channel.send('> CORE Restart Complete..... \n> Awaiting \*\*readdir\*\* Callback...');
  await response2.delete(3000);
  await client.user.setPresence( { game: {name: '御坂網絡 ' + version, type: 3 }});
  let response3 = await message.channel.send('> \*\*MISAKA-NETWORK\*\* Connected.... Callback Sueecss..');
  await response3.delete(2000);
  await client.user.setStatus('online');
  let finreply = await message.channel.send({embed: {
    color: 15597568,
    description: `At : \`${toTimeZone(d, "Asia/Hong_Kong")}\` S.Y.S.T.E.M. Successfully Restarted..`
  }});
  await finreply.delete(5000);
};

  function toTimeZone(d, zone) {
    var format = 'YYYY/MM/DD HH:mm:ss';
    return moment(d, format).tz(zone).format(format);
  };

}

@@ -3,1759 +3,140 @@
 nst 
-fs = require('fs');%0D%0Aconst version = require('../package.json').version;%0D%0Aconst moment = require('moment-timezone');%0D%0Aconst d = new Date();%0D%0Aconst timeout = ms =%3E new Promise(res =%3E setTimeout(res, ms));%0D%0Aexports.run = (client, message, args) =%3E %7B%0D%0A  message.delete();%0D%0A%0D%0A  fs.readFile('../token.txt', 'utf8', (err, data) =%3E %7B%0D%0A  if (err) throw err;%0D%0A  var token = data;%0D%0A%7D);%0D%0A  %0D%0A  restart();%0D%0A%0D%0Aasync function restart() %7B%0D%0A  let response = await message.channel.send('%5C%60S.Y.S.T.E.M. Shutting Down.....%5C%60');%0D%0A  await response.delete(1000);%0D%0A  await client.destroy();%0D%0A  await timeout(3000);%0D%0A  await client.login(token);%0D%0A  await client.user.setStatus('dnd');%0D%0A  await client.user.setPresence( %7B game: %7Bname: '%E5%BE%A1%E5%9D%82%E7%B6%B2%E7%B5%A1 ' + 'Connecting', type: 2 %7D%7D);%0D%0A  let response1 = await message.channel.send('%3E %5C*%5C*%5Bnode.AI%5D%5C*%5C* watching: * -AIM- * %5Cn%3E %5C*%5C*%5Bnode.AI%5D%5C*%5C* Starting AIwaz... %5Cn%3E Loading.. %5C*%5C*MISAKA-NETWORK%5C*%5C* ' + '%5C%60' + version + '%5C%60')%0D%0A  await response1.delete(5000);%0D%0A  let response2 = await message.channel.send('%3E CORE Restart Complete..... %5Cn%3E Awaiting %5C*%5C*readdir%5C*%5C* Callback...');%0D%0A  await response2.delete(3000);%0D%0A  await client.user.setPresence( %7B game: %7Bname: '%E5%BE%A1%E5%9D%82%E7%B6%B2%E7%B5%A1 ' + version, type: 3 %7D%7D);%0D%0A  let response3 = await message.channel.send('%3E %5C*%5C*MISAKA-NETWORK%5C*%5C* Connected.... Callback Sueecss..');%0D%0A  await response3.delete(2000);%0D%0A  await client.user.setStatus('online');%0D%0A  let finreply = await message.channel.send(%7Bembed: %7B%0D%0A    color: 15597568,%0D%0A    description: %60At : %5C%60$%7BtoTimeZone(d, %22Asia/Hong_Kong%22)%7D%5C%60 S.Y.S.T.E.M. Successfully Restarted..%60%0D%0A  %7D%7D);%0D%0A  await finreply.delete(5000);%0D%0A%7D;%0D%0A%0D%0A  function toTimeZone(d, zone) %7B%0D%0A    var format = 'YYYY/MM/DD HH:mm:ss';%0D%0A    return moment(d, format).tz(zone).format(format
+main = require('../bot.js');%0D%0Aexports.run = function(client, message, args) %7B%0D%0A%09message.delete();%0D%0A%09main.restart(client, message
 );%0D%0A
-  
 %7D;%0D%0A
-%0D%0A%7D%0D%0A

Update restart.js