code: 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;
  }
docs: Exit the twitch bot