you can use write and read then use while to join all the channels

Code:
ON *:CONNECT: {
  var %i 1
  ; Joining all the channels that writing in the txt file
  while (%i <= $lines(JoinChannels.txt)) {
      $read(JoinChannels,%i)
      inc %i
  }
}

on *:TEXT:!joinxd*:#:{ 
  if ((%floodjoinxd) || ($($+(%,floodjoinxd.,$nick),2))) { return }
  set -u10 %floodjoinxd On
  set -u30 %floodjoinxd. $+ $nick On
  
  var %jchannel /j $nick
  if ($read(JoinChannels.txt,w,%jchannel)) { msg # Your channel already on the list $nick ! | return }
  else {
    write JoinChannels.txt %jchannel ; writing to the txt file
    msg $chan I joined your channel $nick
  }
}


Hope that will help smile