# Understanding of bot connections

**URL:** <https://discuss.dev.twitch.com/t/understanding-of-bot-connections/31340>\
**Category:** Chat and IRC\
**Created:** [April 18, 2021, 3:06pm UTC](https://discuss.dev.twitch.com/t/understanding-of-bot-connections/31340 "2021-04-18T15:06:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![codehilation](https://avatars.discourse-cdn.com/v4/letter/c/bb73d2/32.png) [@codehilation](https://discuss.dev.twitch.com/u/codehilation)\
**Post date:** [April 18, 2021, 3:06pm UTC](https://discuss.dev.twitch.com/t/understanding-of-bot-connections/31340/1 "2021-04-18T15:06:13Z")

</div>

Hi there. I’m developing my twitch bot, and now I do not clearly understand should I manage connections for each channel JOIN or to have just one connection for the bot. Or have one connection for JOIN and PART, and several connections for example for small channels and a separate connection for big channels. Does it make sense or not?

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [April 18, 2021, 3:18pm UTC](https://discuss.dev.twitch.com/t/understanding-of-bot-connections/31340/2 "2021-04-18T15:18:13Z")

</div>

A chat bot will be disconnected from Twitch Chat if the chat bot can’t keep up and the “message queue to send to the bot” gets too long.

So a small bot will manage fine on a single thread/connection, but you will likely need to add more connections over time if you need to spin out to send/recieve to a number of channels, but thats likely need the triple figure channel depending on a number of factors.

And how you spin out depends on what your bot does and how well it can keep up.

So grow till you have problems and then adjust from there to match your usage.

---

<div class="post-metadata">

**Author:** ![codehilation](https://avatars.discourse-cdn.com/v4/letter/c/bb73d2/32.png) [@codehilation](https://discuss.dev.twitch.com/u/codehilation)\
**Post date:** [April 18, 2021, 4:06pm UTC](https://discuss.dev.twitch.com/t/understanding-of-bot-connections/31340/3 "2021-04-18T16:06:32Z")

</div>

So I’m going to use my bot like Moobot or Nightbot where we have one bot (channel) for all channels. Then how limits for joinings, messages will be in this case. It has limits per connection or for account?

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [April 18, 2021, 4:08pm UTC](https://discuss.dev.twitch.com/t/understanding-of-bot-connections/31340/4 "2021-04-18T16:08:51Z")

</div>

that gets fun ™ its per channel for the most part

> **[Chat & Chatbots](https://dev.twitch.tv/docs/irc/)**
>
> Twitch Chat & Chatbots

In general you shouldn’t get anywhere near the send limit.

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [May 18, 2021, 4:08pm UTC](https://discuss.dev.twitch.com/t/understanding-of-bot-connections/31340/5 "2021-05-18T16:08:52Z")

</div>

Closed on May 18, 2021, 4:08pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
