GithubHelp home page GithubHelp logo

ridgure / tagsbot Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 5 KB

A simple bot that gets the tags of a category on twitch and filters them through a blacklist

Python 100.00%
python twitch api helix twitch-api twitch-bot twitchtv

tagsbot's Introduction

FVCproductions


Markdownify
Tags bot

A bot written in python and made for my Twitch channel Twitch.tv/Ridgure.

Key FeaturesGetting startedAcknowledgementsConnect

Features:

Automated functions:

Done by the bot automatically:
Gets the tags of a category on Twitch
Blacklist certain tags

Getting started

Clone

Clone this repository to your local machine using git clone https://github.com/Ridgure/TagsBot.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:

FollowerToken = "<Token>"          # Token generated by twitchapps.com/tmi without the oauth: part
ClientID = "<ClientID>"            # Your client ID
ClientSecret = "<Client Secret>"   # The client secret of your bot

Specify a blacklist in blacklist.py tags should be in quotation marks and separated by a comma.

tagsBlacklist = ['rerun', 'test']
  • 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:

py -3.10 tagsBot.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

tagsbot's People

Contributors

ridgure avatar

Stargazers

Andrea S avatar  avatar Sjaak avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.