Skip to main content

A websocket based twitch irc chat client

Project description

Twitch WS IRC

how to install

You can install the lib with pip from this repo directly.

pip install git+ssh://git@gitlab.com/henny022/twitch-ws-irc.git#egg=twitch-ws-irc

how to use

proper examples will follow

  • make an Event Handler
from twitch_ws_irc.events import *

class ExampleEventHandler(EventHandler):
    async def on_privmsg(self, event: PrivMsgEvent):
        print(f"{event.user}: {event.message}")
        if event.message == '!test':
            await event.reply(f"hey {event.user}")
        if event.message == '!stop':
            await event.reply('bye')
            await event.websocket.close()
  • start the bot
from twitch_ws_irc.client import TwitchWSIRCClient

async def bot():
    client = TwitchWSIRCClient('twitch token', 'twitch username', 'target channel')
    await client.start(ExampleEventHandler())
    await client.join()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

twitch-ws-irc-0.0.7.tar.gz (13.2 kB view hashes)

Uploaded Source

Built Distribution

twitch_ws_irc-0.0.7-py3-none-any.whl (15.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page