Twitch-Channel-Points-Miner-v2
Twitch-Channel-Points-Miner-v2 copied to clipboard
Give a possibility to write custom bet strategies
Is your feature request related to a problem? Please describe. I found that presented betting strategies aren't enough for me.
Describe the solution you'd like I would like to have the possibility to provide a custom decision-making function to the BetSettings object. I imagine that function smth like (BetContext context) => BetDecision. Where BetContext contains all necessary information about a bet and BetDecision represents a decision like
{
result: BetDecisionResult (BET_1, BET_2, BET_3, DONT_BET)
amount: int
}
Describe alternatives you've considered
- It could be made by changing the source code, but it would cause trouble with updates and could be damaging :c
- Adding every betting strategy from pull requests is working but pretty messy approach. It would bloat strategies with some specific things in the long run.
Additional context I didn't think over what information should be in a BetContext, but I assume there should be all available information.
Maybe even allow redirect to built-in strategy as a decision.
https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/pull/172
https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/pull/172
It's a PR for adding another strategy but this issue targets a more generic approach.