Skip to main content

A Twitch IRC bot integrating twitchAPI and irc

Project description

retroBot

Python IRC Twitch bot module integrating twitchAPI and irc.

Installation

clone this repository

git clone https://github.com/retrontology/retroBot

install the dependencies

cd retroBot
pip install -r requirements.txt

install the module

python setup.py install

Overview

The bot is split into two main components: the retroBot.retroBot and the retroBot.channelHandler. These are designed as a base skeleton class to be subtyped.

retroBot.retroBot is the bot itself, a subtype derived from irc.bot.SingleServerIRCBot and controls the main thread.

A retroBot.channelHandler is created for each channel in the channels parameter passed to retroBot.retroBot constructor. One can also pass their own retroBot.channelHandler subtype to the retroBot.retroBot constructor via the handler parameter, which is ideal as the base handler class does nothing. The retroBot.retroBot instance, when started, passes messages to the respective channel handler instance in a new thread.

There is also the retroBot.config module which needs to be imported separately. This is a simple dict subtype that can save and load itself from a yaml file. I personally use it to supply the bots with the information they need to run, but it's not required.

Examples

There are a few examples in the examples directory

  • TwitchMarkov

    A fork of TwitchMarkov written in retroBot.
  • atton

    A Twitch bot that sends a message in a channel when the channel goes live.
  • twitchlogger

    A Twitch bot that listens to selected channels and logs the messages to a pre-configured PostgreSQL database.
  • test

    The simplest bot that does nothing. Used as a test when developing.

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

retroBot-0.3.4.tar.gz (22.7 kB view details)

Uploaded Source

File details

Details for the file retroBot-0.3.4.tar.gz.

File metadata

  • Download URL: retroBot-0.3.4.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for retroBot-0.3.4.tar.gz
Algorithm Hash digest
SHA256 983b2d0e5c0c9843b8d8a84f0742ab08fa1b2b97f1e119019bbdfe2633b759e1
MD5 3f0b8a7adf68ac087797324567fdc2fd
BLAKE2b-256 591e32a447b80ff0401afe66b621add4cc86fc5d2700a8b8992188f5f0ca7706

See more details on using hashes here.

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