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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file bitbitbot-0.0.10.tar.gz.

File metadata

  • Download URL: bitbitbot-0.0.10.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for bitbitbot-0.0.10.tar.gz
Algorithm Hash digest
SHA256 f19c931ff4bdc0d5fdaa16a711f8946f9d257d87d48d4326c44b69fcd6a05ab9
MD5 bba8559f53b45865d676b339b5c45936
BLAKE2b-256 cc0fa8cb1326a151ca763323417845f719f065e4f9a86bffa8921e95e467068a

See more details on using hashes here.

File details

Details for the file bitbitbot-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: bitbitbot-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for bitbitbot-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 9eb17ba4327e98dbefe5ac16afbab45da7d57cfbb154d48f59f4c81c0388a7f0
MD5 9d17b8462e93d59d157ff85978e3ba38
BLAKE2b-256 0b3387ee9e80b61bc36fe9ff9bf6122be111037ea96fc7ea7e85827fd7f12512

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