Giter VIP home page Giter VIP logo

twitchbots's Introduction

Twitch Bot Directory

Build Status codecov

A directory of Twitch chat bot accounts.

This is the code used for twitchbots.info.

Thanks to Mini2 for the great base template.

License

The code in this repo is licensed under the MIT license.

Used APIs

Thanks to the following APIs, the service can try to curate the list as best as it can on its own:

See Configuration for details on required credentials for the respective APIs.

Set up

Database

The SQL table layout is currently not public, but can be reverse-engineered from the code (look at the unit tests setup.php, or sometimes as a comment in the table wrapper class).

PHP Dependencies

To install all the dependencies get Composer and then run composer install or php composer.phar install, depending on how you installed it. This will then download all the deps and set them up.

Cron Job

It is recommended to set up a cron job that runs php Mini/console.php check every so often. The job removes any bots whose account has since been deleted on twitch. You can also split it out to make fewer API requests in one job.

Configuration

There are two configurations: one is a config.php in a folder called "lib" in the root of the project and contains all configuration needed before the DB connection is established. Almost all values defined by it can be found in the index.php files.

Then there is the config table, which holds key/value pairs for configuration. You should manually set the following:

  • 28_URL: URL to crawl for ModBot.
  • checks_per_day: Number of bot pruning runs per day. Needs to be at least 1, recommended are at least one per hour.
  • client-ID: Twitch Client-ID
  • client-secret: Twitch client secret
  • 3v-ua: User Agent for the Mod Checker API
  • auth0_domain, auth0_redirectUrl, auth0_clientId, auth0_clientSecret: auth0 configuration

Pitfalls

Crawlers

All TypeCrawlers currently rely on the type ID. This means your DeepBots have to have id 22, ModBots 28 and Pajbots 44. I hope to fix this in the future.

Run tests

After installing Composer you can run the unit tests:

php vendor/bin/phpunit --bootstrap vendor/autload.php test

You might want to customize the phpunit.xml to match the database credentials of your system. The unit tests expect a database called twitchbots.

Contributors

Thanks goes to these wonderful people (emoji key):


Martin Giger

๐Ÿ’ป ๐Ÿ› ๐Ÿš‡ ๐Ÿ“– ๐Ÿ’ก

nD00rn

๐Ÿ“–

Luis Muรฑiz

๐ŸŽจ

CBenni

๐Ÿค”

This project follows the all-contributors specification. Contributions of any kind welcome!

twitchbots's People

Contributors

freaktechnik avatar nd00rn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

twitchbots's Issues

Login system

Some kind of login system. Not sure if I want an actual login with user/pw or use oauth from somewehre else. Both need effort.

Try to check bot types

Some bot types have known behaviour patterns. Add a twitch bot that tries to verify those for submissions. Some examples:

  • DeepBot will always reply to !bot with the DeepBot version and info
  • TwitchToken Bot will by default reply to !tokens with the requester's username and a number.
  • Nerdbot defaults to !points
  • ModBot replies to !modbot/!bot/!botinfo

Think of some way to make it clear this is a verification bot. Should wait for result from #22 before joining chats.

Pajbot crawler wrong

The pajbot crawler gets the pajbot channel name instead of the actual twitch channel name. Sometimes they match up sometimes they don't.

Switch to offset/limit pagination

use getOffset in the web views. Also add a total property with the total amount of results for a query. (maybe not for the bot/?bots= one?)

Purge deleted bot accounts

Have a cron job that purges bots that were deleted every so often, by checking the channel API from twitch.

Do proper 24h based pruning

Probably have to add a field to bots and make lastUpdated manually set. Also need to make sure the new field doesn't get exposed anywhere.

Check mod status

This goes with #23, where an IRC client is needed to perform the operation:
Connect to IRC and send .mods instead of using the twitchstuff mods API.

type voting

Allow multiple submissions per username with a predefined type (what about corrections?). Only one with a new one. Consolidate submissions and corrections of the same username.

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.