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
Plazmix API wrapper for Python

An optimised, easy to use Plazmix API wrapper written in Python

Someone 2 Nov 16, 2021
An App to get Ko-Fi payment updates on Telegram.

Deployments. Heroku.com 🚀 Replit.com 🌀 Make sure your app runs 24*7 Zeet.co 💪 Use this :~ Get Bot token from @botfather 🤖 Get ID where you want to

Jainam Oswal 16 Nov 12, 2022
A simple script that will watch a stream for you and earn the channel points.

Credits Main idea: https://github.com/gottagofaster236/Twitch-Channel-Points-Miner Bet system (Selenium): https://github.com/ClementRoyer/TwitchAutoCo

Alessandro Maggio 1.1k Jan 08, 2023
This library is for simplified work with the sms-man.com API

SMSMAN Public API Python This is a lightweight library that works as a connector to Sms-Man public API Installation pip install smsman Documentation h

13 Nov 19, 2022
An Simple Advance Auto Filter Bot Complete Rewritten Version Of Adv-Filter-Bot

Adv Auto Filter Bot V2 This Is Just An Simple Advance Auto Filter Bot Complete Rewritten Version Of Adv-Filter-Bot.. Just Sent Any Text As Query It Wi

0 Dec 18, 2021
Automatically load stolen cookies from ChromePass

AutoCookie - Automatically loading stolen cookies from ChromePass View Demo · Report Bug · Request Feature Table of Contents About the Project Getting

darkArp 21 Oct 11, 2022
🌶️ Give real chat boosting to your discord server.

Chat-Booster Give real chat boosting to your discord server. ✅ Setup: - Add token to scrape messages on server that you whant. - Put the token in

&! Ѵιchy.#0110 36 Nov 04, 2022
Fully Dockerized cryptocurrencies Trading Bot, based on Freqtrade engine. Multi instances.

Cryptocurrencies Trading Bot - Freqtrade Manager This automated Trading Bot is based on the amazing Freqtrade one. It allows you to manage many Freqtr

Cédric Dugat 47 Dec 06, 2022
Pythonic event-processing library based on decorators

Process Events In Style This library aims to simplify the common pattern of event processing. It simplifies the process of filtering, dispatching and

Nicolas Marier 3 Sep 01, 2022
Discord Auto bumper made in python, just a simple auto bumper that I made.

Discord Auto bumper made in python, just a simple auto bumper that I made.

XPTGR 0 Dec 04, 2021
A discord bot consuming Notion API to add, retrieve data to Notion databases.

Notion-DiscordBot A discord bot consuming Notion API to add and retrieve data from Notion databases. Instructions to use the bot: Pre-Requisites: a)In

Servatom 57 Dec 29, 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
Wrapper for the Swiss Parliament API for Python

swissparlpy This module provides easy access to the data of the OData webservice of the Swiss parliament. Table of Contents Installation Usage Get tab

Stefan Oderbolz 8 Jun 13, 2022
Automatically scrape all of your artifacts in Genshin Impact.

Genshin Artifact Scraper Automatically scrape all of your artifacts in Genshin Impact. Features: Simple recalibration (2 steps). GUI to select OCR reg

21 Dec 17, 2022
VC-Music , Playing music without bot.

VC-Userbot A Telegram Userbot to play or streaming Audio and Video songs / files in Telegram Voice Chats. It's made with PyTgCalls and Pyrogram Requir

RioProjectX 8 Aug 04, 2022
Aws-lambda-requests-wrapper - Request/Response wrapper for AWS Lambda with API Gateway

AWS Lambda Requests Wrapper Request/Response wrapper for AWS Lambda with API Gat

1 May 20, 2022
Group Chat Spammer For Discord

Group Chat Spammer For Discord Free and public gc spammer

Dreamy 20 Dec 27, 2022
Weather telegram bot with aiogram, on Russian language

weather_bot Weather telegram bot with aiogram, on Russian language #RU Бот по определению погоды в Telegram, написана на библиотеке aiogram, весь инте

LinkxWan 0 Jan 06, 2022
A liblary whre you can find helpful functions for your discord bot

DBotUtils A liblary whre you can find helpful functions for your discord bot Easy setup Setup is easily and flexible. Change anytime. After setup just

Kondek286 1 Nov 02, 2021
Simple Translator in Python

Simple Translator in Python Project Description: In this project, we'll be making a very simple translator in Python using some libraries. Requirement

Hassan Shahzad 3 Jan 23, 2022