Bobotinho Bot

Main repository for the chatbot Bobotinho.

ℹ️ Introduction

Twitch chatbot with entertainment commands.

‎? Technologies

  • Concurrent code with asyncio
  • Asynchronous HTTP Client/Server with AIOHTTP
  • Relational Database with PostgreSQL
  • In-memory data structure store with Redis
  • Asynchronous ORM (Object Relational Mapper) with Tortoise
  • Asynchronous wrapper around the Twitch API with TwitchIO 2

? Services

‎? Dev tools

? Getting Started

It is assumed that you have:

$ python3 --version
$ pip3 --version

? Access Token

Visit Token Generator and select the "Bot Chat Token". After selecting this you can copy your "Access Token" somewhere safe.

⚙️ Configuring

After clone this repo, create .env file in your /bobotinho-bot directory. Add the access token from above and owner nick after the =. Optionally add and fill other env vars (see .env.template).

ACCESS_TOKEN=your-token-here
OWNER_NAME=your-twitch-nick

▶️ Run

? Option 1: locally

The standard library as of Python 3.3 comes with a concept called "Virtual Environment"s to keep libraries from polluting system installs or to help maintain a different version of libraries than the ones installed on the system.

Execute the following commands in your /bobotinho-bot directory:

$ python3.8 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ env/bin/python bot.py

? Option 2: with docker

It is assumed that you have Docker installed.

$ docker --version

Otherwise, you can download and install Docker here.

Execute the following commands in your /bobotinho-bot directory:

$ docker build -t bobotinho-bot .
$ docker run bobotinho-bot

? Option 3: with docker-compose

It is assumed that you have Docker and Docker Compose installed.

$ docker --version
$ docker-compose --version

Otherwise, you can download and install Docker Compose here.

Execute the following commands in your /bobotinho-bot directory:

$ docker-compose up --build
Use --build flag only on the first run

? Use

Go to twitch.tv/OWNER_NAME and send %ping.

GitHub

GitHub - leandcesar/bobotinho-bot: Main repository for the chatbot Bobotinho.
Main repository for the chatbot Bobotinho. Contribute to leandcesar/bobotinho-bot development by creating an account on GitHub.