Skip to content
This repository has been archived by the owner on May 3, 2023. It is now read-only.

arthurbarros/twitch-chat-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TwitchChatWrapper

This is a simple twitch chat wrapper written on python that I use to build simple bots fast.

installation

pip intall twitch_chat_wrapper

fetchin Twitch oauth password token

Follow this link https://twitchapps.com/tmi/ and save the token

usage

from twitch_chat_wrapper import TwitchChatWrapper

viewers_greetings = []

def message_handler(chat, username, message):
    print("@{}: {}".format(username, message))
    if username not in viewers_greetings:
        chat.send_message("@{} welcome to the stream".format(username))
        viewrs_greetings.append(username)


twitch = TwitchChatWrapper(
    bot_nickname="AwesomeBot", 
    oauth_pass="oauth:r1xxk1111111111112222222222xwd", 
    channel="hardlydifficult") 

twitch.events.on_message += message_handler

twitch.loop()

shout out

To https://www.twitch.tv/hardlydifficult which is building a awesome gamedev twitch community

About

Simple Twitch Chat Wrapper written in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages