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.

You might also like...
Fetch tracking numbers of Amazon orders, for the ease of the logistics.
Fetch tracking numbers of Amazon orders, for the ease of the logistics.

Amazon-Tracking-Number Fetch tracking numbers of Amazon orders, for the ease of the logistics. Read Me First (How to use this code): Get Amazon "Items

List of twitch bots n bigots

This is a collection of bot account names NamelistMASTER contains all the names we reccomend you ban in your channel Sometimes people get on that list

Simple script to ban bots at Twitch chats using a text file as a source.

AUTOBAN 🇺🇸 English version Simple script to ban bots at Twitch chats using a text file as a source. How to use Windows Go to releases for further in

Twitch Points Miner for multiple accounts with Discord logging

Twitch Points Miner for multiple accounts with Discord logging Creator of the Twitch Miner -- PLEASE NOTE THIS IS PROBABLY BANNABLE -- Made on python

Twitch Linux Typer

Twitch Linux Typer The most cursed Twitch chat bot Listens to twitch chat, and then types it handles hotkeys and button presses via the ^ char, eg ctr

A modular Telegram Python bot running on python3 with a sqlalchemy, redislab, mongo database, telethon, and pyrogram.
A modular Telegram Python bot running on python3 with a sqlalchemy, redislab, mongo database, telethon, and pyrogram.

Zeldris Robot A modular Telegram Python bot running on python3 with a sqlalchemy, redislab, mongo database, telethon, and pyrogram. How to set up/depl

Optimus Prime - A modular Telegram group management and drive clone bot running on Python with sqlalchemy database
Optimus Prime - A modular Telegram group management and drive clone bot running on Python with sqlalchemy database

Optimus Prime Bot . 🤖 A modular Telegram group management and drive clone bot r

A modular Telegram Python bot running on python3 with a sqlalchemy database
A modular Telegram Python bot running on python3 with a sqlalchemy database

Nao Tomori Robot Found Me On Telegram As Nao Tomori 🌼 A modular Telegram Python bot running on python3 with a sqlalchemy database. How to setup/deplo

A modular telegram Python bot running on python3 with an sqlalchemy database.

TG_Bot A modular telegram Python bot running on python3 with an sqlalchemy database. Originally a simple group management bot with multiple admin feat

Comments
Owner
raspy
raspy
A bot to display per user data from the Twitch Leak

twitch-leak-bot-discord A bot to display per user data from the Twitch Leak by username Where's the data? I can't and don't want to supply the .csv's

SSSEAL-C 0 Nov 8, 2022
A Twitch bot to provide information from the WebNowPlayingCompanion extension

WebNowPlayingTwitch A Twitch bot made using TwitchIO which displays information obtained from the WebNowPlaying Compaion browser extension. Image is o

NiceAesth 1 Mar 21, 2022
A free, minimal, lightweight, cross-platform, easily expandable Twitch IRC/API bot.

parky's twitch bot A free, minimal, lightweight, cross-platform, easily expandable Twitch IRC/API bot. Features ?? Connect to Twitch IRC chat! ?? Conn

Andreas Schneider 10 Dec 30, 2022
Dante, my discord bot. Open source project in development and not optimized for other filesystems, install and setup script in development

DanteMode (In private development for ~6 months) Dante, my discord bot. Open source project in development and not optimized for other filesystems, in

null 2 Nov 5, 2021
Kanata Bot - a modular bot running on python3 with anime theme and have a lot features

Kanata Bot Kanata Bot is a modular bot running on python3 with anime theme and have a lot features. Easiest Way To Deploy On Heroku This Bot is Create

Rikka-Chan 2 Jan 16, 2022
âš¡TIKTOK BOT - FAST OPTIMIZED ZEFOY SCRIPT

âš¡ ZEFOY [ TikTok Zefoy Bot ] Get the script in: discord.gg/onlp !! Official shop: onlp.sellix.io Newest version v.9.0.0 Requirements pip install p

Tekky 186 Dec 31, 2022
TwitchAccountMaker - Twitch Account Maker with python

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

vanis / 1800 0 Jan 20, 2022
A modular Telegram group management bot running with Python based on Pyrogram.

A modular Telegram group management bot running with Python based on Pyrogram.

Jefanya Efandchris 1 Nov 14, 2022
Automatically gets clips from twitch streams and uploads them to a YouTube channel.

Twitch Stream Highlights to YT Automatic Uploader (AutoBot Clipper) This script can be used to automatically extract highlights (or clips) from a twit

Teja Swaroop 57 Dec 12, 2022
A unified API wrapper for YouTube and Twitch chat bots.

Chatto A unified API wrapper for YouTube and Twitch chat bots. Contributing Chatto is open to contributions. To find out where to get started, have a

Ethan Henderson 5 Aug 1, 2022