optimalstrategy / anikibot

Twitch chat bot written in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sleep tight, aniki

Sleep tight, aniki

Instructions

  • clone the repo

  • generate an oauth key at https://twitchapps.com/tmi/

  • get your JWT token by toggling "Show Secrets" at https://streamelements.com/dashboard/account/channels

  • Optionally, get a YouTube API key at https://console.developers.google.com/. See https://developers.google.com/youtube/v3/getting-started for detailed instructions. This key is required for queueing YouTube playlists.

  • make a secrets.toml file at the root-level of the repo

  • enter the following information:

    name = "BOT_NAME"
    oauth_token = "OAUTH_TOKEN"
    youtube_api_key = "YOUTUBE_API_KEY"  # Optional, required for the YouTube playlists feature
    stream_elements_jwt_token = "stream_elements_JWT_TOKEN"

    Make sure that BOT_NAME matches the user for which the OAUTH_TOKEN was generated!

  • Download and install the PPGA transpiler

    $ cargo install --git https://github.com/OptimalStrategy/ppga/ --features=build-binary
  • Transpile the commands

    # Linux
    $ ppga.sh --batch-output scripts/ppga
    
    # Window
    C:> ppga.bat --batch-output scripts/ppga
  • Optionally build the documentation

    $ cargo doc --no-deps
    # Linux
    $ xdg-open target/doc/backend/index.html
    
    # Windows
    C:> open target/doc/backend/index.html
  • Optionally enable logging by setting the RUST_LOG environment variable:

    # Linux
    $ export RUST_LOG=aniki,backend
    
    # Windows
    PS C:\\dev\\anikibot> $env:RUST_LOG="aniki"
  • Run the program

    $ cargo run --release

TODOs

TODO list

About

Twitch chat bot written in Rust


Languages

Language:Rust 97.2%Language:Lua 2.6%Language:Batchfile 0.1%Language:PowerShell 0.0%