Skip to main content

An unopionated, extensible Twitch Chat Bot

Project description

BitBitBot

An unopinionated, extensible Python ChatBot built for twitch on top of the irc library. For more information, please refer to the documentation.

Example Usage

from bitbitbot.bot

bot = BitBitBot(
    {bot_account_name},         # bitbitbot
    {bot_oauth_token},          # oauth:123456890asdfgh
    {streamer_channel_name},    # metabytez
)

bot.start()

Creating Plugins

Assuming you have installed bitbitbot in a virtualenv called .venv and then create the following project structure

|- my_bot
|- - .venv
|- - plugins
|- - - my_plugin
|- - - - commands.py

You can add the following code to the commands.py file, to register your first command.

from bitbitbot import command
from bitbitbot.bot import BitBitBot
from bitbitbot.models import TwitchTags


@command('foo')
def foo(bot: BitBitBot, msg: str, tags: TwitchTags) -> None:
    bot.send_message('Hello World!')

The name of the directories inside of plugins can be whatever you want, but the root directory must be called plugins

You can have multiple directories in the plugins directory

You can add multiple commands to a single commands.py file.

The name of the function does not have to match the command name.

You don't need the type annotations, they are just for demonstration purposes.

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

bitbitbot-0.0.10.tar.gz (7.0 kB view hashes)

Uploaded Source

Built Distribution

bitbitbot-0.0.10-py3-none-any.whl (8.7 kB view hashes)

Uploaded Python 3

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