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
TeslaPy - A Python implementation based on unofficial documentation of the client side interface to the Tesla Motors Owner API

TeslaPy - A Python implementation based on unofficial documentation of the client side interface to the Tesla Motors Owner API, which provides functiona

Tim Dorssers 233 Dec 30, 2022
Source code for "Efficient Training of BERT by Progressively Stacking"

Introduction This repository is the code to reproduce the result of Efficient Training of BERT by Progressively Stacking. The code is based on Fairseq

Gong Linyuan 101 Dec 02, 2022
Framework for creating and running trading strategies. Blatantly stolen copy of qtpylib to make it work for Indian markets.

_• Kinetick Trade Bot Kinetick is a framework for creating and running trading strategies without worrying about integration with broker and data str

Vinay 41 Dec 31, 2022
pyhakuna is a client to access the API of the time keeping service hakuna.ch.

pyhakuna pyhakuna is a client to access the API of the time keeping service hakuna.ch. The Hakuna API is – unfortunately – personal and currently does

Christian Mäder 1 Feb 15, 2022
a translator bot for discord

TranslatorBOT it is a simple and powerful discord bot, it been used for translating includes more than 100 language, it has a lot of integrated comman

Mear. 2 Feb 03, 2022
Instagram boosting

instagram boosting bot This bot can boost your instagram account! Rules and Instruction Use git clone to download this repository Open cmd/terminal an

Eskimo 4 Oct 20, 2022
Cdk-python-crud-app - CDK Python CRUD App

Welcome to your CDK Python project! You should explore the contents of this proj

Shapon Sheikh 1 Jan 12, 2022
:cloud: Python API for ThePirateBay.

Unofficial Python API for ThePirateBay. Build Status Test Coverage Version Downloads (30 days) Installation $ pip install ThePirateBay Note that ThePi

Karan Goel 334 Oct 21, 2022
Indian Space Research Organisation API With Python

ISRO Indian Space Research Organisation API Installation pip install ISRO Usage import isro isro.spacecrafts() # returns spacecrafts data isro.lau

Fayas Noushad 5 Aug 11, 2022
A minimalistic, modern Discord bot for roles and polls using dropdowns

DropBot A minimalistic, modern Discord bot for roles and polls using dropdowns Made by ThatOneCalculator Technologies used Instructions Type /, and na

ModernBots 1 Jun 27, 2022
A GitHub Actions repo for tracking the dummies sending free money to Alex Jones + co.

A GitHub Actions repo for tracking the dummies sending free money to Alex Jones + co.

Egarok 2 Jul 20, 2022
🤟The VC Music Source code of @DaisyXBot ❤️ v3 Out now

DAISYXMUSIC V3 🎵 A bot that can play music on telegram group's voice call Available on telegram as @DaisyXbot Whats new 🔥 Thumbnail Support Playlist

TeamDaisyX 207 Dec 05, 2022
Telegram Client and Bot that use Artificial Intelligence to auto-reply to scammers and waste their time

scamminator Blocking a scammer is not enough. It is time to fight back. Wouldn't be great if there was a tool that uses Artificial Intelligence to rep

Federico Galatolo 6 Nov 12, 2022
A discord bot that will help you browse/download nhentai sources.

Risa Introduction Risa is an nHentai discord bot that will help you browse and download your favorite doujin inside your own discord server. Hosting M

markee7 14 Oct 25, 2021
pokemon-colorscripts compatible for mac

Pokemon colorscripts some scripts to print out images of pokemons to terminal. Inspired by DT's colorscripts compilation Description Prints out colore

43 Jan 06, 2023
Sentiment Analysis web app using Streamlit - American Airlines Tweets

Analyse des sentiments à partir des Tweets L'application est développée par Streamlit L'analyse sentimentale est effectuée sur l'ensemble de données d

Abida Hassan 2 Feb 04, 2022
Modified Version of mega.py package for Pyrogram Bots

Pyro Mega.py Python library for the Mega.co.nz API, currently supporting: login uploading downloading deleting searching sharing renaming moving files

I'm Not A Bot #Left_TG 10 Aug 03, 2022
An integrated information collection tool

infoscaner 环境配置 目前infoscaner仅支持在linux上运行,建议运行在最新版本的kali中 infoscaner是基于python3版本实现的,运行之前首先安装python库 如果同时存在python2和python3,请输入以下命令 pip3 install -r requi

CMACCKK 74 Sep 13, 2021
An unofficial wrapper for Engineer Man's Piston API

Pistonpy Pistonpy is an API wrapper for the Piston code execution engine by Engineer Man. Key Features Simple modern and efficient Pythonic API using

AalbatrossGuy 4 Jan 03, 2022
ThetaGang is an IBKR bot for collecting money

💬 Join the Matrix chat, we can get money together. Θ ThetaGang Θ Beat the capitalists at their own game with ThetaGang 📈 ThetaGang is an IBKR tradin

Brenden Matthews 1.5k Jan 08, 2023