index.js
function exit() {
  if (!initialized || exited)
    return;

  log('Exiting...', true);

  // Leave the twitch channel
  if (ircClient)
    ircClient.part(config.channel);

  // Leave discord
  if (discordClient)
    discordClient.disconnect();

  // Clear the stream check interval
  if (streamInterval)
    clearInterval(streamInterval);

  // Clear all the timeouts
  timeouts.forEach(function(t) {
    clearTimeout(t);
  });

  exited = true;
}
function exit() {
  if (!initialized || exited)
    return;

  log('Exiting...', true);

  // Leave the twitch channel
  if (ircClient)
    ircClient.part(config.channel);

  // Leave discord
  if (discordClient)
    discordClient.disconnect();

  // Clear the stream check interval
  if (streamInterval)
    clearInterval(streamInterval);

  // Clear all the timeouts
  timeouts.forEach(function(t) {
    clearTimeout(t);
  });

  exited = true;
}
function exit ( ) { if ( ! initialized || exited ) return ; log ( 'Exiting...' , true ) ; // Leave the twitch channel if ( ircClient ) ircClient . part ( config . channel ) ; // Leave discord if ( discordClient ) discordClient . disconnect ( ) ; // Clear the stream check interval if ( streamInterval ) clearInterval ( streamInterval ) ; // Clear all the timeouts timeouts . forEach ( function ( t ) { clearTimeout ( t ) ; } ) ; exited = true ; }
Exit the twitch bot
Exit the twitch bot