Remove betting/prediction system - focus on drops only

This commit is contained in:
2026-02-17 14:51:34 +01:00
parent fa4f4a757f
commit 9cfcb0d28c
9 changed files with 33 additions and 952 deletions

192
README.md
View File

@@ -32,10 +32,6 @@ Read more about Twitch Drops [here](https://help.twitch.tv/s/article/mission-bas
5. 🔧 [Settings](#settings)
- [LoggerSettings](#loggersettings)
- [StreamerSettings](#streamersettings)
- [BetSettings](#betsettings)
- [Bet strategy](#bet-strategy)
- [FilterCondition](#filtercondition)
- [Example](#example)
6. 🍪 [Migrating from an old repository (the original one)](#migrating-from-an-old-repository-the-original-one)
7. 🪟 [Windows](#windows)
8. 📱 [Termux](#termux)
@@ -58,7 +54,6 @@ If you appreciate the original work this project is based on, consider supportin
- Automatic downloading of the list of followers and using it as an input ✔️
- Better 'Watch Streak' strategy in the priority system [#11](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/11) ✔️
- Auto claiming [game drops](https://help.twitch.tv/s/article/mission-based-drops) from the Twitch inventory [#21](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/21) ✔️
- Placing a bet / making a prediction with your channel points [#41](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/41) ([@lay295](https://github.com/lay295)) ✔️
- Switchable analytics chart that shows the progress of your points with various annotations [#96](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/96) ✔️
- Joining the IRC Chat to increase the watch time and get StreamElements points [#47](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/47) ✔️
- [Moments](https://help.twitch.tv/s/article/moments) claiming [#182](https://github.com/rdavydov/Twitch-Channel-Points-Miner-v2/issues/182) ✔️
@@ -74,18 +69,9 @@ If you appreciate the original work this project is based on, consider supportin
%d/%m/%y %H:%M:%S - INFO - [set_offline]: 😴 Streamer(username=streamer-username3, channel_id=0000000, channel_points=61365) is Offline!
%d/%m/%y %H:%M:%S - INFO - [set_offline]: 😴 Streamer(username=streamer-username4, channel_id=0000000, channel_points=3760) is Offline!
%d/%m/%y %H:%M:%S - INFO - [set_online]: 🥳 Streamer(username=streamer-username, channel_id=0000000, channel_points=61365) is Online!
%d/%m/%y %H:%M:%S - INFO - [start_bet]: 🔧 Start betting for EventPrediction(event_id=xxxx-xxxx-xxxx-xxxx, title=Please star this repo) owned by Streamer(username=streamer-username, channel_id=0000000, channel_points=61365)
%d/%m/%y %H:%M:%S - INFO - [__open_coins_menu]: 🔧 Open coins menu for EventPrediction(event_id=xxxx-xxxx-xxxx-xxxx, title=Please star this repo)
%d/%m/%y %H:%M:%S - INFO - [__click_on_bet]: 🔧 Click on the bet for EventPrediction(event_id=xxxx-xxxx-xxxx-xxxx, title=Please star this repo)
%d/%m/%y %H:%M:%S - INFO - [__enable_custom_bet_value]: 🔧 Enable input of custom value for EventPrediction(event_id=xxxx-xxxx-xxxx-xxxx, title=Please star this repo)
%d/%m/%y %H:%M:%S - INFO - [on_message]: ⏰ Place the bet after: 89.99s for: EventPrediction(event_id=xxxx-xxxx-xxxx-xxxx-15c61914ef69, title=Please star this repo)
%d/%m/%y %H:%M:%S - INFO - [on_message]: 🚀 +12 → Streamer(username=streamer-username, channel_id=0000000, channel_points=61377) - Reason: WATCH.
%d/%m/%y %H:%M:%S - INFO - [make_predictions]: 🍀 Going to complete bet for EventPrediction(event_id=xxxx-xxxx-xxxx-xxxx-15c61914ef69, title=Please star this repo) owned by Streamer(username=streamer-username, channel_id=0000000, channel_points=61377)
%d/%m/%y %H:%M:%S - INFO - [make_predictions]: 🍀 Place 5k channel points on: SI (BLUE), Points: 848k, Users: 190 (70.63%), Odds: 1.24 (80.65%)
%d/%m/%y %H:%M:%S - INFO - [on_message]: 🚀 +6675 → Streamer(username=streamer-username, channel_id=0000000, channel_points=64206) - Reason: PREDICTION.
%d/%m/%y %H:%M:%S - INFO - [on_message]: 📊 EventPrediction(event_id=xxxx-xxxx-xxxx-xxxx, title=Please star this repo) - Result: WIN, Points won: 6675
%d/%m/%y %H:%M:%S - INFO - [on_message]: 🚀 +12 → Streamer(username=streamer-username, channel_id=0000000, channel_points=64218) - Reason: WATCH.
%d/%m/%y %H:%M:%S - INFO - [on_message]: 🚀 +12 → Streamer(username=streamer-username, channel_id=0000000, channel_points=64230) - Reason: WATCH.
%d/%m/%y %H:%M:%S - INFO - [on_message]: 🚀 +12 → Streamer(username=streamer-username, channel_id=0000000, channel_points=61389) - Reason: WATCH.
%d/%m/%y %H:%M:%S - INFO - [on_message]: 🚀 +12 → Streamer(username=streamer-username, channel_id=0000000, channel_points=61401) - Reason: WATCH.
%d/%m/%y %H:%M:%S - INFO - [claim_bonus]: 🎁 Claiming the bonus for Streamer(username=streamer-username, channel_id=0000000, channel_points=64230)!
%d/%m/%y %H:%M:%S - INFO - [on_message]: 🚀 +60 → Streamer(username=streamer-username, channel_id=0000000, channel_points=64290) - Reason: CLAIM.
%d/%m/%y %H:%M:%S - INFO - [on_message]: 🚀 +12 → Streamer(username=streamer-username, channel_id=0000000, channel_points=64326) - Reason: WATCH.
@@ -105,17 +91,7 @@ If you appreciate the original work this project is based on, consider supportin
%d/%m %H:%M:%S - 😴 streamer-username3 (xxx points) is Offline!
%d/%m %H:%M:%S - 😴 streamer-username4 (xxx points) is Offline!
%d/%m %H:%M:%S - 🥳 streamer-username (xxx points) is Online!
%d/%m %H:%M:%S - 🔧 Start betting for EventPrediction: Please star this repo owned by streamer-username (xxx points)
%d/%m %H:%M:%S - 🔧 Open coins menu for EventPrediction: Please star this repo
%d/%m %H:%M:%S - 🔧 Click on the bet for EventPrediction: Please star this repo
%d/%m %H:%M:%S - 🔧 Enable input of custom value for EventPrediction: Please star this repo
%d/%m %H:%M:%S - ⏰ Place the bet after: 89.99s EventPrediction: Please star this repo
%d/%m %H:%M:%S - 🚀 +12 → streamer-username (xxx points) - Reason: WATCH.
%d/%m %H:%M:%S - 🍀 Going to complete bet for EventPrediction: Please star this repo owned by streamer-username (xxx points)
%d/%m %H:%M:%S - 🍀 Place 5k channel points on: SI (BLUE), Points: 848k, Users: 190 (70.63%), Odds: 1.24 (80.65%)
%d/%m %H:%M:%S - 🚀 +6675 → streamer-username (xxx points) - Reason: PREDICTION.
%d/%m %H:%M:%S - 📊 EventPrediction: Please star this repo - Result: WIN, Points won: 6675
%d/%m %H:%M:%S - 🚀 +12 → streamer-username (xxx points) - Reason: WATCH.
%d/%m %H:%M:%S - +12 → streamer-username (xxx points) - Reason: WATCH.
%d/%m %H:%M:%S - 🚀 +12 → streamer-username (xxx points) - Reason: WATCH.
%d/%m %H:%M:%S - 🚀 +60 → streamer-username (xxx points) - Reason: CLAIM.
%d/%m %H:%M:%S - 🚀 +12 → streamer-username (xxx points) - Reason: WATCH.
@@ -131,28 +107,8 @@ If you appreciate the original work this project is based on, consider supportin
%d/%m/%y %H:%M:%S - 📄 Logs file: /.../path/Twitch-Channel-Points-Miner-v2/logs/username.timestamp.log
%d/%m/%y %H:%M:%S - ⌛ Duration 10:29:19.547371
%d/%m/%y %H:%M:%S - 📊 BetSettings(Strategy=Strategy.SMART, Percentage=7, PercentageGap=20, MaxPoints=7500
%d/%m/%y %H:%M:%S - 📊 EventPrediction(event_id=xxxx-xxxx-xxxx-xxxx, title="Event Title1")
Streamer(username=streamer-username, channel_id=0000000, channel_points=67247)
Bet(TotalUsers=1k, TotalPoints=11M), Decision={'choice': 'B', 'amount': 5289, 'id': 'xxxx-yyyy-zzzz'})
Outcome0(YES (BLUE) Points: 7M, Users: 641 (58.49%), Odds: 1.6, (5}%)
Outcome1(NO (PINK),Points: 4M, Users: 455 (41.51%), Odds: 2.65 (37.74%))
Result: {'type': 'LOSE', 'won': 0}
%d/%m/%y %H:%M:%S - 📊 EventPrediction(event_id=yyyy-yyyy-yyyy-yyyy, title="Event Title2")
Streamer(username=streamer-username, channel_id=0000000, channel_points=3453464)
Bet(TotalUsers=921, TotalPoints=11M), Decision={'choice': 'A', 'amount': 4926, 'id': 'xxxx-yyyy-zzzz'})
Outcome0(YES (BLUE) Points: 9M, Users: 562 (61.02%), Odds: 1.31 (76.34%))
Outcome1(YES (PINK) Points: 3M, Users: 359 (38.98%), Odds: 4.21 (23.75%))
Result: {'type': 'WIN', 'won': 6531}
%d/%m/%y %H:%M:%S - 📊 EventPrediction(event_id=ad152117-251b-4666-b683-18e5390e56c3, title="Event Title3")
Streamer(username=streamer-username, channel_id=0000000, channel_points=45645645)
Bet(TotalUsers=260, TotalPoints=3M), Decision={'choice': 'A', 'amount': 5054, 'id': 'xxxx-yyyy-zzzz'})
Outcome0(YES (BLUE) Points: 689k, Users: 114 (43.85%), Odds: 4.24 (23.58%))
Outcome1(NO (PINK) Points: 2M, Users: 146 (56.15%), Odds: 1.31 (76.34%))
Result: {'type': 'LOSE', 'won': 0}
%d/%m/%y %H:%M:%S - 🤖 Streamer(username=streamer-username, channel_id=0000000, channel_points=67247), Total points gained (after farming - before farming): -7838
%d/%m/%y %H:%M:%S - 💰 CLAIM(11 times, 550 gained), PREDICTION(1 times, 6531 gained), WATCH(35 times, 350 gained)
%d/%m/%y %H:%M:%S - 🤖 Streamer(username=streamer-username, channel_id=0000000, channel_points=67247), Total points gained (after farming - before farming): 1243
%d/%m/%y %H:%M:%S - 💰 CLAIM(11 times, 550 gained), WATCH(35 times, 350 gained)
%d/%m/%y %H:%M:%S - 🤖 Streamer(username=streamer-username2, channel_id=0000000, channel_points=61365), Total points gained (after farming - before farming): 977
%d/%m/%y %H:%M:%S - 💰 CLAIM(4 times, 240 gained), REFUND(1 times, 605 gained), WATCH(11 times, 132 gained)
%d/%m/%y %H:%M:%S - 🤖 Streamer(username=streamer-username5, channel_id=0000000, channel_points=25960), Total points gained (after farming - before farming): 1680
@@ -176,7 +132,6 @@ from TwitchChannelPointsMiner.classes.Webhook import Webhook
from TwitchChannelPointsMiner.classes.Telegram import Telegram
from TwitchChannelPointsMiner.classes.Gotify import Gotify
from TwitchChannelPointsMiner.classes.Settings import Priority, Events, FollowersOrder
from TwitchChannelPointsMiner.classes.entities.Bet import Strategy, BetSettings, Condition, OutcomeKeys, FilterCondition, DelayMode
from TwitchChannelPointsMiner.classes.entities.Streamer import Streamer, StreamerSettings
twitch_miner = TwitchChannelPointsMiner(
@@ -208,28 +163,28 @@ twitch_miner = TwitchChannelPointsMiner(
),
telegram=Telegram( # You can omit or set to None if you don't want to receive updates on Telegram
chat_id=123456789, # Chat ID to send messages @getmyid_bot
token="123456789:shfuihreuifheuifhiu34578347", # Telegram API token @BotFather
token="123456789:shfuihreuifheuifheuifhiu34578347", # Telegram API token @BotFather
events=[Events.STREAMER_ONLINE, Events.STREAMER_OFFLINE,
Events.BET_LOSE, Events.CHAT_MENTION], # Only these events will be sent to the chat
Events.CHAT_MENTION], # Only these events will be sent to the chat
disable_notification=True, # Revoke the notification (sound/vibration)
),
discord=Discord(
webhook_api="https://discord.com/api/webhooks/0123456789/0a1B2c3D4e5F6g7H8i9J", # Discord Webhook URL
events=[Events.STREAMER_ONLINE, Events.STREAMER_OFFLINE,
Events.BET_LOSE, Events.CHAT_MENTION], # Only these events will be sent to the chat
Events.CHAT_MENTION], # Only these events will be sent to the chat
),
webhook=Webhook(
endpoint="https://example.com/webhook", # Webhook URL
method="GET", # GET or POST
events=[Events.STREAMER_ONLINE, Events.STREAMER_OFFLINE,
Events.BET_LOSE, Events.CHAT_MENTION], # Only these events will be sent to the endpoint
Events.CHAT_MENTION], # Only these events will be sent to the endpoint
),
matrix=Matrix(
username="twitch_miner", # Matrix username (without homeserver)
password="...", # Matrix password
homeserver="matrix.org", # Matrix homeserver
room_id="...", # Room ID
events=[Events.STREAMER_ONLINE, Events.STREAMER_OFFLINE, Events.BET_LOSE], # Only these events will be sent
events=[Events.STREAMER_ONLINE, Events.STREAMER_OFFLINE], # Only these events will be sent
),
pushover=Pushover(
userkey="YOUR-ACCOUNT-TOKEN", # Login to https://pushover.net/, the user token is on the main page
@@ -242,32 +197,16 @@ twitch_miner = TwitchChannelPointsMiner(
endpoint="https://example.com/message?token=TOKEN",
priority=8,
events=[Events.STREAMER_ONLINE, Events.STREAMER_OFFLINE,
Events.BET_LOSE, Events.CHAT_MENTION],
Events.CHAT_MENTION],
)
),
streamer_settings=StreamerSettings(
make_predictions=True, # If you want to Bet / Make prediction
follow_raid=True, # Follow raid to obtain more points
claim_drops=True, # We can't filter rewards base on stream. Set to False for skip viewing counter increase and you will never obtain a drop reward from this script. Issue #21
claim_moments=True, # If set to True, https://help.twitch.tv/s/article/moments will be claimed when available
watch_streak=True, # If a streamer go online change the priority of streamers array and catch the watch screak. Issue #11
community_goals=False, # If True, contributes the max channel points per stream to the streamers' community challenge goals
chat=ChatPresence.ONLINE, # Join irc chat to increase watch-time [ALWAYS, NEVER, ONLINE, OFFLINE]
bet=BetSettings(
strategy=Strategy.SMART, # Choose you strategy!
percentage=5, # Place the x% of your channel points
percentage_gap=20, # Gap difference between outcomesA and outcomesB (for SMART strategy)
max_points=50000, # If the x percentage of your channel points is gt bet_max_points set this value
stealth_mode=True, # If the calculated amount of channel points is GT the highest bet, place the highest value minus 1-2 points Issue #33
delay_mode=DelayMode.FROM_END, # When placing a bet, we will wait until `delay` seconds before the end of the timer
delay=6,
minimum_points=20000, # Place the bet only if we have at least 20k points. Issue #113
filter_condition=FilterCondition(
by=OutcomeKeys.TOTAL_USERS, # Where apply the filter. Allowed [PERCENTAGE_USERS, ODDS_PERCENTAGE, ODDS, TOP_POINTS, TOTAL_USERS, TOTAL_POINTS]
where=Condition.LTE, # 'by' must be [GT, LT, GTE, LTE] than value
value=800
)
)
)
)
@@ -276,18 +215,18 @@ twitch_miner = TwitchChannelPointsMiner(
# The streamers array can be a String -> username or Streamer instance.
# The settings priority are: settings in mine function, settings in TwitchChannelPointsMiner instance, default settings.
# For example, if in the mine function you don't provide any value for 'make_prediction' but you have set it on TwitchChannelPointsMiner instance, the script will take the value from here.
# For example, if in the mine function you don't provide any value but you have set it on TwitchChannelPointsMiner instance, the script will take the value from here.
# If you haven't set any value even in the instance the default one will be used
#twitch_miner.analytics(host="127.0.0.1", port=5000, refresh=5, days_ago=7) # Start the Analytics web-server (replit: host="0.0.0.0")
twitch_miner.mine(
[
Streamer("streamer-username01", settings=StreamerSettings(make_predictions=True , follow_raid=False , claim_drops=True , watch_streak=True , community_goals=False , bet=BetSettings(strategy=Strategy.SMART , percentage=5 , stealth_mode=True, percentage_gap=20 , max_points=234 , filter_condition=FilterCondition(by=OutcomeKeys.TOTAL_USERS, where=Condition.LTE, value=800 ) ) )),
Streamer("streamer-username02", settings=StreamerSettings(make_predictions=False , follow_raid=True , claim_drops=False , bet=BetSettings(strategy=Strategy.PERCENTAGE , percentage=5 , stealth_mode=False, percentage_gap=20 , max_points=1234 , filter_condition=FilterCondition(by=OutcomeKeys.TOTAL_POINTS, where=Condition.GTE, value=250 ) ) )),
Streamer("streamer-username03", settings=StreamerSettings(make_predictions=True , follow_raid=False , watch_streak=True , community_goals=True , bet=BetSettings(strategy=Strategy.SMART , percentage=5 , stealth_mode=False, percentage_gap=30 , max_points=50000 , filter_condition=FilterCondition(by=OutcomeKeys.ODDS, where=Condition.LT, value=300 ) ) )),
Streamer("streamer-username04", settings=StreamerSettings(make_predictions=False , follow_raid=True , watch_streak=True , )),
Streamer("streamer-username05", settings=StreamerSettings(make_predictions=True , follow_raid=True , claim_drops=True , watch_streak=True , community_goals=True , bet=BetSettings(strategy=Strategy.HIGH_ODDS , percentage=7 , stealth_mode=True, percentage_gap=20 , max_points=90 , filter_condition=FilterCondition(by=OutcomeKeys.PERCENTAGE_USERS, where=Condition.GTE, value=300 ) ) )),
Streamer("streamer-username01", settings=StreamerSettings(follow_raid=False , claim_drops=True , watch_streak=True , community_goals=False )),
Streamer("streamer-username02", settings=StreamerSettings(follow_raid=True , claim_drops=False )),
Streamer("streamer-username03", settings=StreamerSettings(follow_raid=False , watch_streak=True , community_goals=True )),
Streamer("streamer-username04", settings=StreamerSettings(follow_raid=True , watch_streak=True )),
Streamer("streamer-username05", settings=StreamerSettings(follow_raid=True , claim_drops=True , watch_streak=True , community_goals=True )),
Streamer("streamer-username06"),
Streamer("streamer-username07"),
Streamer("streamer-username08"),
@@ -442,12 +381,6 @@ ColorPalette(
GAIN_FOR_CLAIM = Fore.YELLOW,
GAIN_FOR_WATCH = Fore.YELLOW,
GAIN_FOR_WATCH_STREAK = Fore.YELLOW,
BET_WIN = Fore.GREEN,
BET_LOSE = Fore.RED,
BET_REFUND = Fore.RESET,
BET_FILTERS = Fore.MAGENTA,
BET_GENERAL = Fore.BLUE,
BET_FAILED = Fore.RED,
)
```
@@ -469,7 +402,7 @@ Telegram(
chat_id=123456789,
token="123456789:shfuihreuifheuifhiu34578347",
events=[Events.STREAMER_ONLINE, Events.STREAMER_OFFLINE,
Events.BET_LOSE, Events.CHAT_MENTION],
Events.CHAT_MENTION],
disable_notification=True,
)
```
@@ -494,7 +427,7 @@ If you want to receive log updates on Discord initialize a new Discord class, el
Discord(
webhook_api="https://discord.com/api/webhooks/0123456789/0a1B2c3D4e5F6g7H8i9J",
events=[Events.STREAMER_ONLINE, Events.STREAMER_OFFLINE,
Events.BET_LOSE, Events.CHAT_MENTION],
Events.CHAT_MENTION],
)
```
@@ -512,7 +445,7 @@ Webhook(
endpoint="https://example.com/webhook",
method="GET",
events=[Events.STREAMER_ONLINE, Events.STREAMER_OFFLINE,
Events.BET_LOSE, Events.CHAT_MENTION],
Events.CHAT_MENTION],
)
```
@@ -523,13 +456,6 @@ Webhook(
- `GAIN_FOR_RAID`
- `GAIN_FOR_CLAIM`
- `GAIN_FOR_WATCH`
- `BET_WIN`
- `BET_LOSE`
- `BET_REFUND`
- `BET_FILTERS`
- `BET_GENERAL`
- `BET_FAILED`
- `BET_START`
- `BONUS_CLAIM`
- `MOMENT_CLAIM`
- `JOIN_RAID`
@@ -540,13 +466,11 @@ Webhook(
### StreamerSettings
| Key | Type | Default | Description |
|-------------------- |------------- |-------------------------------- |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `make_predictions` | bool | True | Choose if you want to make predictions / bet or not |
| `follow_raid` | bool | True | Choose if you want to follow raid +250 points |
| `claim_drops` | bool | True | If this value is True, the script will increase the watch-time for the current game. With this, you can claim the drops from Twitch Inventory [#21](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/21) |
| `claim_moments` | bool | True | If set to True, [moments](https://help.twitch.tv/s/article/moments) will be claimed when available |
| `watch_streak` | bool | True | Choose if you want to change a priority for these streamers and try to catch the Watch Streak event [#11](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/11) |
| `community_goals` | bool | False | If True, contributes the max channel points per stream to the streamers' community challenge goals |
| `bet` | BetSettings | | Rules to follow for the bet |
| `chat` | ChatPresence | ONLINE | Join IRC-Chat to appear online in chat and attempt to get StreamElements channel points and increase view-time [#47](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/47) |
Allowed values for `chat` are:
@@ -555,82 +479,6 @@ Allowed values for `chat` are:
- `ONLINE` Partecipate to IRC chat if the streamer is online (leave if offline)
- `OFFLINE` Partecipate to IRC chat if the streamer is offline (leave if online)
### BetSettings
| Key | Type | Default | Description |
|-------------------- |----------------- |--------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `strategy` | Strategy | SMART | Choose your strategy! See below for more info |
| `percentage` | int | 5 | Place the x% of your channel points |
| `percentage_gap` | int | 20 | Gap difference between outcomesA and outcomesB (for SMART stragegy) |
| `max_points` | int | 50000 | If the x percentage of your channel points is GT bet_max_points set this value |
| `stealth_mode` | bool | False | If the calculated amount of channel points is GT the highest bet, place the highest value minus 1-2 points [#33](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/33) |
| `delay_mode` | DelayMode | FROM_END | Define how is calculating the waiting time before placing a bet |
| `delay` | float | 6 | Value to be used to calculate bet delay depending on `delay_mode` value |
#### Bet strategy
- **MOST_VOTED**: Select the option most voted based on users count
- **HIGH_ODDS**: Select the option with the highest odds
- **PERCENTAGE**: Select the option with the highest percentage based on odds (It's the same that show Twitch) - Should be the same as select LOWEST_ODDS
- **SMART_MONEY**: Select the option with the highest points placed. [#331](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/331)
- **SMART**: If the majority in percent chose an option, then follow the other users, otherwise select the option with the highest odds
- **NUMBER_1**: Always select the 1st option, BLUE side if there are only two options
- **NUMBER_2**: Always select the 2nd option, PINK side if there are only two options
- **NUMBER_3**: Always select the 3rd option
- **NUMBER_4**: Always select the 4th option
- **NUMBER_5**: Always select the 5th option
- **NUMBER_6**: Always select the 6th option
- **NUMBER_7**: Always select the 7th option
- **NUMBER_8**: Always select the 8th option
![Screenshot](https://raw.githubusercontent.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/master/assets/prediction.png)
Here a concrete example:
- **MOST_VOTED**: 21 Users have select **'over 7.5'**, instead of 9 'under 7.5'
- **HIGH_ODDS**: The highest odd is 2.27 on **'over 7.5'** vs 1.79 on 'under 7.5'
- **PERCENTAGE**: The highest percentage is 56% for **'under 7.5'**
- **SMART**: Calculate the percentage based on the users. The percentages are: 'over 7.5': 70% and 'under 7.5': 30%. If the difference between the two percentages is higher than `percentage_gap` select the highest percentage, else the highest odds.
In this case if percentage_gap = 20 ; 70-30 = 40 > percentage_gap, so the bot will select 'over 7.5'
### FilterCondition
| Key | Type | Default | Description |
|------------- |------------- |--------- |---------------------------------------------------------------------------------- |
| `by` | OutcomeKeys | None | Key to apply the filter |
| `where` | Condition | None | Condition that should match for place bet |
| `value` | number | None | Value to compare |
Allowed values for `by` are:
- `PERCENTAGE_USERS` (no sum) [Would never want a sum as it'd always be 100%]
- `ODDS_PERCENTAGE` (no sum) [Doesn't make sense to sum odds]
- `ODDS` (no sum) [Doesn't make sense to sum odds]
- `DECISION_USERS` (no sum)
- `DECISION_POINTS` (no sum)
- `TOP_POINTS` (no sum) [Doesn't make sense to the top points of both sides]
- `TOTAL_USERS` (sum)
- `TOTAL_POINTS` (sum)
Allowed values for `where` are: `GT, LT, GTE, LTE`
#### Example
- If you want to place the bet ONLY if the total of users participants in the bet is greater than 200
`FilterCondition(by=OutcomeKeys.TOTAL_USERS, where=Condition.GT, value=200)`
- If you want to place the bet ONLY if the winning odd of your decision is greater than or equal to 1.3
`FilterCondition(by=OutcomeKeys.ODDS, where=Condition.GTE, value=1.3)`
- If you want to place the bet ONLY if the highest bet is lower than 2000
`FilterCondition(by=OutcomeKeys.TOP_POINTS, where=Condition.LT, value=2000)`
### DelayMode
- **FROM_START**: Will wait `delay` seconds from when the bet was opened
- **FROM_END**: Will until there is `delay` seconds left to place the bet
- **PERCENTAGE**: Will place the bet when `delay` percent of the set timer is elapsed
Here's a concrete example. Let's suppose we have a bet that is opened with a timer of 10 minutes:
- **FROM_START** with `delay=20`: The bet will be placed 20s after the bet is opened
- **FROM_END** with `delay=20`: The bet will be placed 20s before the end of the bet (so 9mins 40s after the bet is opened)
- **PERCENTAGE** with `delay=0.2`: The bet will be placed when the timer went down by 20% (so 2mins after the bet is opened)
## Migrating from an old repository (the original one):
If you already have a `twitch-cookies.pkl` and you don't want to log in again, please create a `cookies/` folder in the current directory and then copy the .pkl file with a new name `your-twitch-username.pkl`
```