Issues with bot connecting to mass channels

Your bot is exceeded the “messages Twitch keeps in a queue to send you as your bot can’t keep up” queue and is being DC’ed

You need to spread the load of the chats/channels across multiple instances of the bot.

So for example

Instead of one bot on 2000 channels
You run 4 bots on 500 channels instead.

And/or adjust the load distrubution as needed so you don’t get DC’ed

You may also be exceeding the “join in x time” limit and getting DC’ed as a result, see Rate LImits https://dev.twitch.tv/docs/irc/guide#command--message-limits