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
File-sharing-Bot: Telegram Bot to store Posts and Documents and it can Access by Special Links.

Bromélia HSS bromelia-hss is the second official implementation of a Diameter-based protocol application by using the Python micro framework Bromélia.

1 Dec 17, 2021
The program for obtaining a horoscope in Python using API from rapidapi.com site.

Python horoscope The program allows you to get a horoscope for your zodiac sign and immediately translate it into almost any language. Step 1 The firs

Architect 0 Dec 25, 2021
A Discord BOT that uses Google Sheets for storing the roles and permissions of a discord server.

Discord Role Manager Bot Role Manager is a discord BOT that utilizes Google Sheets for the organization of a server's hierarchy and permissions. Detai

Dion Rigatos 17 Oct 13, 2022
Template to create a telegram bot in python

Template for Telegram Bot Template to create a telegram bot in python. How to Run Set your telegram bot token as environment variable TELEGRAM_BOT_TOK

PyTopia 10 Mar 07, 2022
This repository contains Python code examples using the MoneyMoov API

Python Examples This repository contains Python code examples using the MoneyMoov API. The examples are written to operate in the NoFrixion sandbox en

nofrixion 1 Feb 08, 2022
API kumpulan doa-doa sesuai al-qur'an dan as-sunnah

API kumpulan doa-doa sesuai al-qur'an dan as-sunnah

Miftah Afina 4 Nov 26, 2022
Host your Python Discord Bot 24/7 for free. POC

🐉 Pandore 🐉 The easiest and fastest way to host your Python3 Discord Bot 24/7 for free! 📚 Documentation 📚 If you encounter any problem while using

Billy 73 Jan 02, 2023
Discord bot for Shran development

shranbot A discord bot named Herbert West that will monitor the Shran development discord server. Using dotenv shranbot uses a .env file to load secre

Matt Williams 1 Jul 29, 2022
SpautiNoFay - A simple and beautiful music player created with Python

SpautiNoFay A simple and beautiful music player created with Python Why SpautiNo

8 Jan 19, 2022
An elegant mirai-api-http v2 Python SDK.

Ariadne 一个适用于 mirai-api-http v2 的 Python SDK。 本项目适用于 mirai-api-http 2.0 以上版本。 目前仍处于开发阶段,内部接口可能会有较大的变化。 安装 poetry add graia-ariadne 或 pip install graia

Graia Project 259 Jan 02, 2023
Discord bot to display private leaderboards for Advent of Code.

Advent Of Code Discord Bot Discord bot for displaying Advent of Code private leardboards, as well as custom leaderboards where participants can set th

The Future Gadgets Lab 6 Nov 29, 2022
Auto Liker, Auto Reaction, Auto Comment, Auto Follower Tool. RajeLiker Credit Hacker.

Auto Liker, Auto Reaction, Auto Comment, Auto Follower Tool. RajeLiker Credit Hacker. Unlimited RajeLiker Credit Hack. Thanks To RajeLiker.

Md. Mehedi Hasan 32 Dec 28, 2022
SimpleTelegramScraper - A python script scrapes accounts from public groups via Telegram API and saves them in a CSV file

SimpleTelegramScraper - the best scraper on GitHub This simple python script scr

Deniz Shabani 12 Oct 06, 2022
API Basica per a synologys Active Backup For Buissiness

Synology Active Backup for Business API-NPP Informació Per executar el programa

Nil Pujol 0 May 13, 2022
A simple Discord Bot created for basic functionality and fun chat commands for use in a private server.

LoveAndChaos-Bot v0.1.0 LoveAndChaos-Bot is a Discord Bot specifically designed for a private server; this bot is merely a test and a method to expose

Morgan Rose 1 Dec 12, 2021
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
Listen to the radio station from your favorite broadcast

Latest news Listen to the radio station from your favorite broadcast MyCroft Radio Skill for testing and copy at docker skill About Play regional radi

1 Dec 22, 2021
This is a telegram bot built using the Oxford Dictionary API

Oxford Dictionaries Telegram Bot This is a telegram bot built using the Oxford Dictionary API Source: Oxford Dictionaries API Documentation Install En

Abhijith N T 2 Mar 18, 2022
A simple script & container to pull COVID data from covidlive.com.au and post a summary to a slack channel

CovidLive AU Summary Slackbot This bot is a very simple slackbot that pulls data, summarises and posts up to date AU COVID stats to a provided slack c

James 3 Dec 18, 2021
Isobot is originally made by notsniped. This is a remix of iso.bot by archisha.

iso6.9-08122021b-1.2beta Isobot is originally made by notsniped#0002. This is a remix of iso.bot by αrchιshα#5518. isobot6.9 is a Discord bot written

Kamilla Youver 3 Jan 11, 2022