https://github.com/HisuianZoroark/TwitchPlaysPS
I originally wanted to build this about a year ago as a way to learn how websockets work and understand protocols. I didn't. However, thanks to PartMan's PS-Client package and HoeenHero's patience I was still able to put this together.
Here is how it works: upon every request (where you need to submit a move, switch a pokemon etc.) the bot converts the request into possible commands for the viewers to submit as votes, then when the voting time is up it quickly uses the most voted command and runs the command in the battle.
It is still a bit temperamental and only works on most current gen singles formats currently, but it is in a state where it can be used by anyone for a stream or etc.
Instructions and commands are in the repository's readme if you want to use it, enjoy!
(ty Isaiah, Imperial and others for helping me either debug or quickly grab client messages mid development for testing)
I originally wanted to build this about a year ago as a way to learn how websockets work and understand protocols. I didn't. However, thanks to PartMan's PS-Client package and HoeenHero's patience I was still able to put this together.
Here is how it works: upon every request (where you need to submit a move, switch a pokemon etc.) the bot converts the request into possible commands for the viewers to submit as votes, then when the voting time is up it quickly uses the most voted command and runs the command in the battle.
It is still a bit temperamental and only works on most current gen singles formats currently, but it is in a state where it can be used by anyone for a stream or etc.
Instructions and commands are in the repository's readme if you want to use it, enjoy!
(ty Isaiah, Imperial and others for helping me either debug or quickly grab client messages mid development for testing)