Skip to main content

Very simple to use Twitch chat bot for lurking chat that does not require an oauth token

Project description

simple-twitch-chat-listener

Seeing the pure lack of twitch chat bots that are only meant for listening in and not requiring oauth tokens I decided to make my own.

This package is only meant for Twitch chat and is only capable of receiving messages, not sending

Pros:

  • Does not require a oauth token
  • Extremely simple setup
  • Chat listener runs on a separate thread

Cons:

  • Not much experience with edge case error handling

Installation

pip install -U simple-twitch-chat-listener

Example usage

from simple_twitch_chat_listener import TwitchChatListener

def my_message_handler(username, message):
    print(f"{username}: {message}")

tc = TwitchChatListener("goldenbeaster")
tc.set_client_message_handler(my_message_handler)
tc.start()

# Place your code here
import time
time.sleep(10)
# endof place your code here

# once you want to stop the service
tc.stop()

Other examples can be found here

Stuff that still needs to be done

actual RECONNECT handling

network connectivity testing

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

simple_twitch_chat_listener-0.2.1.tar.gz (6.0 kB view hashes)

Uploaded Source

Built Distribution

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