Connect bot to new channel via function?

You mean following or joining the chat to send/receive messages of that channel? Your OP is unclear.

If it’s chat then you just need to use the join command for the library.

Better of checking with the devs of twitch.js as this is a general forum for Developers not the twitch.js support forums