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)
Built Distribution
Close
Hashes for twitch_ws_irc-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd2a66e0d786c384cb250cf943d14c44ff628c9abccd41d90da1ccd1cad2ff75 |
|
MD5 | 911562cbc60a9e10cdab82e16eac7e5a |
|
BLAKE2b-256 | dcff14b4067b1f161ac52097b3edb501981f594df9d2292c3e0a1baa198d65ef |