Moderator_id error

You appear to be overwriting your accessToken variable with an App Access token. These tokens represent an App, not a user, thus they don’t have a user id nor scopes, so while at some point your accessToken may have the correct token, you’re overwriting it with the wrong one.

Also,

It’s quite excessive to create a separate connection for each individual channel, and provides no benefit to you as the rate limits are shared across all connections for that account. You should just use 1 connection and have it join all the channels.