kritzware / twitch-bot

🤖 Easily create chat bots for Twitch.tv
https://www.npmjs.com/package/twitch-bot
MIT License
148 stars 36 forks source link

Allow joining multiple channels with one instance #9

Closed PBug90 closed 6 years ago

PBug90 commented 6 years ago

I see lots of use cases that involve being able to communicate in multiple channels with one Bot Instance, for example for long-term data analysis of chats in specific channels.

I can provide a PR if you like.

kritzware commented 6 years ago

Hi @anXieTyPB,

I remember originally thinking about this idea, but not deciding on it for some issue I can't seem to remember, regardless though this would be a cool optional feature. I don't have enough time to work on this project at the moment, so if you'd like to do a PR that would be great! 👍

I imagine the syntax as the following:

const Bot = new TwitchBot({
  username: 'Kappa_Bot',
  oauth: 'oauth:dwiaj91j1KKona9j9d1420',
  channels: [
    'twitch',
    'kappa',
    'lirik'
  ]
})

Perhaps a hard cap on the multiple connection instances (no. of channels connected per IRC instance) as well (e.g. 5-10?), but I'll leave that up to you 😄

PBug90 commented 6 years ago

Can you give permission to push a new branch?

kritzware commented 6 years ago

It would be easier if you could fork the repository, make your changes in a new branch, then do a pull request 👍

kritzware commented 6 years ago

Pull request merged: https://github.com/kritzware/twitch-bot/commit/4c81915717a719325f7faa3f32c356d2ac8dc174