function init() {
  while (true) {
    guild = select_guild();
    if (guild === undefined) {
      console_out("No guild selected.\nShowing direct messages...");
      rl.pause();
      rl_sync.keyInPause(" ");
      rl.resume();
      channel = select_other();
      if (channel === undefined) {
        exit("No channel selected. Exiting...");
      } else {
        set_title("#" + channel_name());
        update_prompt();
        return;
      }
    }

    while (true) {
      channel = select_channel();
      if (channel === undefined) {
        break;
      }
      set_title("#" + channel_name());
      update_prompt();
      return;
    }
  }
}
// Menu that selects a channel from nothing
Menu that selects a channel from nothing
Menu that selects a channel from nothing
function init() {
  while (true) {
    guild = select_guild();
    if (guild === undefined) {
      console_out("No guild selected.\nShowing direct messages...");
      rl.pause();
      rl_sync.keyInPause(" ");
      rl.resume();
      channel = select_other();
      if (channel === undefined) {
        exit("No channel selected. Exiting...");
      } else {
        set_title("#" + channel_name());
        update_prompt();
        return;
      }
    }
    while (true) {
      channel = select_channel();
      if (channel === undefined) {
        break;
      }
      set_title("#" + channel_name());
      update_prompt();
      return;
    }
  }
}
function init ( ) { while ( true ) { guild = select_guild ( ) ; if ( guild === undefined ) { console_out ( "No guild selected.\nShowing direct messages..." ) ; rl . pause ( ) ; rl_sync . keyInPause ( " " ) ; rl . resume ( ) ; channel = select_other ( ) ; if ( channel === undefined ) { exit ( "No channel selected. Exiting..." ) ; } else { set_title ( "#" + channel_name ( ) ) ; update_prompt ( ) ; return ; } } while ( true ) { channel = select_channel ( ) ; if ( channel === undefined ) { break ; } set_title ( "#" + channel_name ( ) ) ; update_prompt ( ) ; return ; } } }
Menu that selects a channel from nothing
Menu that selects a channel from nothing