SkillAgentSearch skills...

TwitchBot

This is an irc bot written in python by Ridgure for Ridgure

Install / Use

/learn @Ridgure/TwitchBot

README

<a href="http://www.twitch.tv/ridgure"><img src="https://pbs.twimg.com/profile_banners/4144666635/1656852039/1500x500" title="FVCproductions" alt="FVCproductions"></a>

<h1 align="center"> <br> <a href="http://www.twitch.tv/ridgure"><img src="https://pbs.twimg.com/profile_images/965416492924891136/N-EvLzcd_400x400.jpg" alt="Markdownify" width="200"></a> <br> Riboture <br> </h1> <h4 align="center">An IRC bot written in python and made for my Twitch channel <a href="https://twitch.tv/ridgure" target="_blank">Twitch.tv/Ridgure</a>.</h4> <p align="center"> <a href="#key-features">Key Features</a> • <a href="#getting-started">Getting started</a> • <a href="#acknowledgements">Acknowledgements</a> • <a href="#connect">Connect</a> </p>

Features:

Commands:

Commands for everyone:

| General: | |---------------| | !commands | | !lurk | | !fc | | !followdate | | !oclock | | !uptime | | !asylumcraft | | !bot | | !support |

| Stating emotion: | |----------------------| | !bellyrub <username> | | !scrowl <username> | | !smile <username> |

| Minecraft related: | |--------------------| | !pack | | !sevtech | | !tp | | !java |

| Runescape related: | |------------------------------| | !oscommands | | !osrank <username> <skill> | | !osirank <username> <skill> | | !oshirank <username> <skill> | | !osuirank <username> <skill> | | !osdmrank <username> <skill> |

| Socials: | Links to socials: | | ------------- |:---------------------------------------------------------------------:| | !social | Shows all Ridgure's social media accounts | | !instagram | link to Instagram | | !facebook | link to Facebook | | !twitter | link to Twitter | | !discord | link to Discord | | !ctt | Generates a custom Click to Tweet link when sent in the twitch chat |

| Calculator: | | ------------- | | !add | | !multipy | | !divide |

| Bat cave: | | ------------- | | !bat | | !batnamechange| | !batgenderchange|

Subscriber commands:

| Elf tree: | |------------------| | !elf | | !elfnamechange | | !elfgenderchange |

Broadcaster commands:

| Tables: | |---------------| | !raid | | !shout | | !breakdance |

User specific commands:

| User specific: | |-------------------------| | !lick - Wolfpupgirl | | !timemeout - KbigLiar | | !jc747 - JC747 | | !octo - Octostarx | | !ruffle - IvanabCroftin |

Automated functions:

| Done by the bot automatically: | |-------------------------------------------------| | Follower notification | | Subscriber notification | | Output last 20 messages in chat to a file | | "Eww cobble" every time cobble is mentioned | | Times out non vip/moderators if they post links | | Bans users that use bad language |

Getting started

Clone

Clone this repository to your local machine using git clone https://github.com/Ridgure/TwitchBot.git

Setup

In order to be able to run the bot add a file config.py in the same folder as the bot and go through the steps below: config.py should look something like this:

Host = "irc.twitch.tv"         # The Twitch IRC server
Port = 6667                    # Always use port 6667!
Nickname = "<Name>"            # Your Twitch username, lowercase
FollowerToken = "<Token>"      # Token generated by twitchapps.com/tmi without the oauth: part
SubscriberToken = "<Token>"    # Self generated token
Channel = "#<Channel>"         # The channel you want to join
ClientID = "<ClientID>"        # Your client ID
  • Create a Twitch account with the name of your bot
  • Register your application on the Twitch developer site
    • Set the Name to the name of the account you just created
    • Set the redirect uri to http://localhost
    • Set the application directory to Chat Bot
    • Agree to the terms and conditions
    • Get a Client_ID and a Client_Secret
  • Generate your token for accessing follower data and chat
    • Go to Get token here and click connect with twitch
    • Click Authorize
    • Your token should look something like this: oauth:a1b2c3d4e5f6g7h8i9j1k2l3m5n6o7
  • Generate your token for accessing subscriber data
    • Go to the link underneath
    • Remember to swap out <clientID> with your client id!
    • Click Authenticate
    • It will look like you got a blank page but your url should look like the second url
    • Your access token is the gibberish where it says Token in the url
https://id.twitch.tv/oauth2/authorize?client_id=<clientID>&redirect_uri=http://localhost&response_type=token&scope=channel_subscriptions+user_read+channel_check_subscription+chat_login
http://localhost/#access_token=<Token>&scope=channel_subscriptions+user_read+channel_check_subscription+chat_login&token_type=bearer

Prerequisites

You will need to install these things to run the bot

Running the bot

Run bot.py by going to its location and running this command:

python bot.py

Acknowledgements:

This whole project started off with this Instructables article

Other interesting projects to check out:

PythonBot by ZERG3R on Twitch as ZERG3R

Ponderier by DillonEA on Twitch as DillonEA

Xekeism by XekeDeath on Twitch as XekeDeath

Connect:

Twitch

See the bot in action when I am live on Twitch over at Twitch.tv/Ridgure

Social media

Please follow me on: Facebook, Twitter and Instagram

Related Skills

View on GitHub
GitHub Stars6
CategoryDevelopment
Updated1y ago
Forks4

Languages

Python

Security Score

75/100

Audited on Oct 16, 2024

No findings