Skip to content

benjidotsh/PyTwitchChat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyTwitchChat

PyTwitchChat is a Python package to interact with the chat of a Twitch channel.

Installation

Use the package manager pip to install PyTwitchChat.

pip install pytwitchchat

Usage

from pytwitchchat import TwitchChatClient

TWITCH_CHAT_CLIENT = TwitchChatClient(password, username, channel, handler)
TWITCH_CHAT_CLIENT.connect()
TWITCH_CHAT_CLIENT.run()

def handle(message, user, is_mod):
    print(user + " says " + message + " and " + "is a moderator." if is_mod else "is not a moderator.")
  • <password> needs to be an OAuth token. You can use Twitch Chat OAuth Password Generator to generate an OAauth token.
  • <username> and <channel> need to be in lowercase.
  • handler is not required.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About

Python package to interact with the chat of a Twitch channel

Resources

License

Stars

Watchers

Forks

Languages