1
0

stop.js 683 B

1234567891011121314151617181920
  1. async function cmd_stop(lang, msg, args, line, wiki) {
  2. if ( args[0] === 'force' && args.slice(1).join(' ').split('\n')[0].isMention(msg.guild) ) {
  3. await msg.replyMsg( 'I\'ll destroy myself now!', {}, true );
  4. await msg.client.shard.send('SIGKILL');
  5. } else if ( args.join(' ').split('\n')[0].isMention(msg.guild) ) {
  6. await msg.replyMsg( 'I\'ll restart myself now!', {}, true );
  7. console.log( '\n- Restarting all shards!\n\n' );
  8. await msg.client.shard.respawnAll();
  9. } else if ( msg.channel.type !== 'text' || !pause[msg.guild.id] ) {
  10. this.LINK(lang, msg, line, wiki);
  11. }
  12. }
  13. module.exports = {
  14. name: 'stop',
  15. everyone: false,
  16. pause: false,
  17. owner: true,
  18. run: cmd_stop
  19. };