Modular Python-based Twitch bot optimized for customizability and ease of use.

Overview

rasbot

Modular Python-based Twitch bot optimized for customizability and ease of use.

rasbot is a Python-based Twitch bot that runs on your Twitch account, and comes with a short list of methods to facilitate the creation of simple chat commands, such as a simple keyboard command that shows your keyboard.

rasbot also comes set up to allow users to easily create their own custom methods, where if you know how to code it in Python, it can run as a command for your Twitch bot, for example, the provided np method that reads from a file created by osu!StreamCompanion and outputs 'now playing' information into the chat.

Join our official Discord server to discuss rasbot development, including issues, ideas, and share methods.

How to Use

  1. Download and install Python version 3.10.0+
  2. Download the Source Code:

Using git: git clone https://github.com/raspy-on-osu/rasbot
Or, click on Code and Download ZIP.

  1. Run this command in the installation folder to install requirements:
py -m pip install -r requirements.txt
  1. Run setup.py and follow the steps to set up your authentication.
  2. Run run.py. If you set up rasbot correctly, it will log some information and print something similar to:
Joined #raspy_on_osu! (57511738)

If setup.py fails, see "Setting up your authentication manually".

rasbot will automatically check for updates every time you run run.py. You can check for updates manually by running update.py, and force a reinstallation of built-in modules using the command:

update.py --force

Managing Commands

Create/update a command:
r!cmdadd <name> <cooldown> <parameters> <response>

Remove a command:
r!cmddel <name>

Valid parameters include:
-modonly: Set the command to be moderator/broadcaster use only.
-hidden: Set the command to be hidden from the help method.

By default, a command's name must contain only alphanumeric characters and underscores.

Example:

Creating the np command which uses methods/np.py:
r!cmdadd np 5 &np&

Making it hidden and mod-only:
r!cmdadd np 5 -hidden -modonly &np&

Removing it:
r!cmddel np

Methods

Methods are subprograms that allow the user to run specific snippits of code whenever a message is sent, or a command response contains a methods' name encased in &.
To use a method in a command, encase the method name in & symbols, such as in the examples above.
For documentation on creating your own method, see this.

Setting up your authentication manually

If setup.py doesn't work, here's how to do it manually...

To have rasbot run properly, you need 5 things:

  1. user_id: Your Twitch username.
  2. client_id: The Client ID for the Twitch app, set-up below.
  3. client_secret: The Client Secret for the Twitch app, set-up below
  4. irc_oauth: The Twitch IRC OAuth, used for connecting to Twitch chat.
  5. oauth: The Twitch API OAuth, used for making calls to the Twitch API.

user_id and oauth are the easiest as you already know your user_id, and oauth is configured automatically by the refresh_oauth.py program.

Ensure you have Twitch.tv two-factor authentication enabled on your account:

Go to your Twitch account settings, Security and Privacy. Scroll to Security and click "Set Up Two-Factor Authentication" and follow the steps.

This is required to register an application to get your Client ID and Secret.

To get the Client ID and Client Secret:

  1. Log in to https://dev.twitch.tv/.
  2. Go to "Your Console" in the top right.
  3. On the right side pane, click Register Your Application.
  4. Give it a name (doesn't matter), add an OAuth redirect to http://localhost, set the Category to Chat Bot

Make sure to click "Add" to add the OAuth redirect.

  1. Click on Manage. This will show you your Client ID.
  2. On the same page is the "New Secret" button to create the Client Secret.

To get the IRC OAuth:

  1. Go to https://twitchapps.com/tmi/ and log in.
  2. Add the key given to irc_oauth, exclude "oauth:".

To get your Twitch OAuth: If you've configured your _AUTH file correctly, you should be able to run refresh_oauth.py and it will configure your Twitch OAuth for you.

Note that this oauth key needs to be refreshed once every two months.

Here's a sample of how your _AUTH file should look BEFORE running the above:

user_id:taeyang_square_jumps
client_id:agd9fga84tijaer
client_secret:4gijoa48u9adfg
irc_oauth:gafd89ugi34j5aer

Make sure that there is the empty line at the bottom of the file.

Owner
raspy
raspy
Send pm to Admin - Telegram

Send pm to Admin - Telegram

Ahoora 3 Nov 17, 2022
Flask-SQLAlchemy API for daisuki-web

💟 Anime Daisuki! API API de animes com cadastro de usuários. O usuário autenticado pode avaliar e favoritar animes, comentar episódios e verificar o

Paulo Thor 1 Nov 04, 2021
This repository will be a draft of a package about the latest total marine fish production in Indonesia. Data will be collected from PIPP (Pusat Informasi Pelabuhan Perikanan).

indomarinefish This package will give us information about the latest total marine fish production in Indonesia. The Name of the fish is written in In

1 Oct 13, 2021
Unfollows Users You're Following

Github-Unfollow-Bot Info It unfollows users you're following, it runs in the background so you can still do what you do without it bothering you. It's

ExT 4 Sep 03, 2022
A bot to get Statistics like the Playercount from your Minecraft-Server on your Discord-Server

Hey Thanks for reading me. Warning: My English is not the best I have programmed this bot to show me statistics about the player numbers and ping of m

spaffel 12 Sep 24, 2022
A python package to easy the integration with Direct Online Pay (Mpesa, TigoPesa, AirtelMoney, Card Payments)

A python package to easy the integration with Direct Online Pay (DPO) which easily allow you easily integrate with payment options once without having to deal with each of them individually;

Jordan Kalebu 2 Nov 25, 2021
Track player's stats, find out when they're online and grinding!

Hypixel Stats Tracker Track player's stats, find out when they're online and playing games! INFO Showcase Server: https://discord.gg/yY5qQHPar6 Suppor

4 Dec 18, 2022
Jackrabbit Relay is an API endpoint for stock, forex and cryptocurrency exchanges that accept REST webhooks.

JackrabbitRelay Jackrabbit Relay is an API endpoint for stock, forex and cryptocurrency exchanges that accept REST webhooks. Disclaimer Please note RA

Rose Heart 23 Jan 04, 2023
A Python wrapper around the OpenWeatherMap web API

PyOWM A Python wrapper around OpenWeatherMap web APIs What is it? PyOWM is a client Python wrapper library for OpenWeatherMap (OWM) web APIs. It allow

Claudio Sparpaglione 740 Dec 18, 2022
Andrei 1.4k Dec 24, 2022
A discord bot written in discord.py to manage custom roles assigned to boosters of your server.

BBotty A discord bot written in discord.py to manage custom roles assigned to boosters of your server. v0.0.1-alpha released! This version is incomple

Oui002 1 Nov 27, 2021
The purpose of this bot is to take soundcloud track requests, that are posted in the stream-requests channel, and add them to a playlist, to make the process of scrolling through the requests easier for Root

Discord Song Collector Dont know if anyone is actually going to read this, but the purpose of this bot is to check every message in the stream-request

2 Mar 01, 2022
TwitchAccountMaker - Twitch Account Maker with python

Twitch Account Creator A Twitch Account Creator, Requires Capmonster.cloud Verif

vanis / 1800 0 Jan 20, 2022
Fully asynchronous trace.moe API wrapper

AioMoe Fully asynchronous trace.moe API wrapper Installation You can install the stable version from PyPI: $ pip install aiomoe Or get it from github

2 Jun 26, 2022
Using Streamlit to build a simple UI on top of the OpenSea API

OpenSea API Explorer Using Streamlit to build a simple UI on top of the OpenSea API. 🤝 Contributing Contributions, issues and feature requests are we

Gavin Capriola 1 Jan 04, 2022
A very tiny python api for the stock exchange tradegate.de

pytradegate A very tiny python api for the stock exchange tradegate.de The api provides the recent ask/bid data and all other data as found on the det

dunderstr aka seimen 7 Aug 24, 2022
WhatsApp Multi Device Client

WhatsApp Multi Device Client

23 Nov 18, 2022
A cracking tool of Xiaomi Dr AI (Archytas / Archimedes)

Archytas Tool 我们强烈抵制闲鱼平台上未经授权的刷机服务! 我对本人之前在程序中为防止违规刷机服务添加未生效的格机代码感到抱歉,在此声明此过激行为与 Crack Mi Dr AI Team 无关,并将程序开源。 A cracking tool of Xiaomi Dr AI (Archy

rponeawa 5 Oct 25, 2022
A discord bot that manages your server's hedge fund

Can't Hide Money Bot A discord bot that manages your server's hedge fund Installing Install wkhtmltopdf sudo apt-get install wkhtmltopdf OR brew insta

Kelvin Abrokwa-Johnson 0 Oct 16, 2021
Free and Open Source Group Voice chat music player for telegram ❤️ with button support youtube playback support

Free and Open Source Group Voice chat music player for telegram ❤️ with button support youtube playback support

Sehath Perera 1 Jan 08, 2022