
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
This is a simple Python library for connecting to the Twitch IRC chat and sending/receiving messages.
This is the main class for the Twitch IRC client and has the following methods:
__init__(self, user: str = "justinfan12345", token: str = "oauth:1234567890")
: Initializes the client with the given
username and OAuth token.join(self, channel: str) -> None
: Joins the given channel.leave(self, channel: str) -> None
: Leaves the given channel.connect(self) -> None
: Connects to the Twitch IRC server.disconnect(self) -> None
: Disconnect from the Twitch IRC server.send_message(self, channel: str, message: str) -> None
: Sends a message to the given channel.send_reply(self, message_id: str, channel: str, reply: str) -> None
: Sends a reply to the given message.read(self) -> Generator[TwitchPrivateMessage, None, None]
: Reads messages from the Twitch IRC server.This class represents a Twitch private message and has the following attributes:
badges
(set): A set of strings representing the badges the user has.color
(str): The color of the user's username in the chat.name
(str): The user's display name.first_message
(bool): Whether this is the user's first message in the chat.message_id
(str): The ID of the message.is_moderator
(bool): Whether the user is a moderator.is_broadcaster
(bool): Whether the user is the broadcaster.is_returning_chatter
(bool): Whether the user has been in the chat before.room_id
(int): The ID of the room.is_subscriber
(bool): Whether the user is a subscriber.is_turbo
(bool): Whether the user has Twitch Turbo.user_id
(int): The ID of the user.name
(str): The user's name.channel
(str): The channel the message was sent to.content
(str): The contents of the message.To use this library, create a Twitch
instance and call its methods to connect to the Twitch IRC chat and send/receive
messages.
from twitch import Twitch
client = Twitch(user="your_username", token="your_oauth_token")
client.connect()
client.join("your_channel")
client.send_message("your_channel", "Hello, world!")
for message in client.read():
print(message.name + ": ", message.content)
client.disconnect()
All contributions are welcome! Please open an issue or pull request if you have any suggestions or find any bugs.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Allows you to connect to Twitch IRC and send and receive messages.
We found that twitchypy_irc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.