Skip to content

A bot for twitch chat to play a game by voting for the next inputs to send to the game.

Notifications You must be signed in to change notification settings

ValouBambou/twitch-play-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twitch play rust

A simple bot to allow twitch chat to vote for the next input that will be played on stream.

The keyboard simulation part is done using the TFC crate so it should work fine on Windows, MacOs, and Linux (for Wayland extra steps are needed according to the README).

Getting Started

Configuration file

Add a config.toml file with the corresponding info :

  • name: the nickname of the bot.
  • channel: the twitch channel you want to join.
  • password: the auth token you get by connecting to https://twitchapps.com/tmi/.
  • cooldown: the number of seconds for the chat to vote.
  • commands: a dictionnary of pairs (command name, key name) where you can choose command as you want to map to some Key on your keyboard. The name of the keys are the same as the Key enum here.

Example of config file

name = "twitchplaybot"
channel = "yourchannelname"
password = "oauth:yourtokenfromtwitchapps"
cooldown = 30

[commands]
"left" = "LeftArrow"
"right" = "RightArrow"
"jump" = "Space"
"pause" = "Escape"

Get the executable

From source

Install the rust toolchain and compile the project using cargo build --release. You may want to add the target flag, for instance with --target x86_64-pc-windows-gnu for WSL user that want to compile in order to run it directly in windows.

Then don't forget to add the config.toml file in the same directory as the executable file.

About

A bot for twitch chat to play a game by voting for the next inputs to send to the game.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages