The DS did have an IR sensor but (I’m pretty sure, don’t quote me too hard here) a majority of the local communication was using either wifi or a proprietary wireless connection using the wifi antenna/chip.
I specifically remember Pokemon Black/White having an IR quick-trade option where you had to put 2 DS’s back-to-back and being really confused about it because it seemed useless since it took so long to actually work.
I’m guessing lemmy.cafe has .ml blocked but not the other way around, OP likely can’t see your comment