Closed aVitomin closed 3 years ago
Duplicate of #157
It only happens if i don't use twitch_miner.mine (followers = True)
after twitch_miner.analytics (host =" 0.0.0.0 ", port = 5000, refresh = 5)
But if i use twitch_miner.mine (followers = True)
bets dont wotks (i dont 100% shure, but in my 2-hour test, the bot did not place any bets)
from TwitchChannelPointsMiner import TwitchChannelPointsMiner
twitch_miner = TwitchChannelPointsMiner("your-twitch-username")
twitch_miner.analytics(host="0.0.0.0", port=5000, refresh=5) # Analytics web-server
twitch_miner.mine(followers=True)
from TwitchChannelPointsMiner.logger import LoggerSettings, ColorPalette
from TwitchChannelPointsMiner.classes.Settings import Priority
from TwitchChannelPointsMiner.classes.entities.Bet import Strategy, BetSettings, Condition, OutcomeKeys, FilterCondition
from TwitchChannelPointsMiner.classes.entities.Streamer import Streamer, StreamerSettings
twitch_miner = TwitchChannelPointsMiner(
username="***",
...
)
If i use that, bot probably ignore default setting from twitch_miner = TwitchChannelPointsMiner(...)
code and use default from TwitchChannelPointsMiner.py
and etc
Well yeah, as you create 2 different instances on line 2 and near the end.
Well yeah, as you create 2 different instances on line 2 and near the end.
How i can fix that ?
from TwitchChannelPointsMiner import TwitchChannelPointsMiner
twitch_miner = TwitchChannelPointsMiner("your-twitch-username")
twitch_miner.analytics(host="0.0.0.0", port=5000, refresh=5) # Analytics web-server
from TwitchChannelPointsMiner.logger import LoggerSettings, ColorPalette
from TwitchChannelPointsMiner.classes.Settings import Priority
from TwitchChannelPointsMiner.classes.entities.Bet import Strategy, BetSettings, Condition, OutcomeKeys, FilterCondition
from TwitchChannelPointsMiner.classes.entities.Streamer import Streamer, StreamerSettings
twitch_miner = TwitchChannelPointsMiner(
username="***",
...
just do this and ignore duplicate logs ?
I change all default settings and wanna use it, but i dont understand how to enable web stats and dont ruin my setts
I don't know. Just try and figure out what's the problem. Can do a PR if you figure it.
I personally have no problems with it (on windows & linux)
import logging
from TwitchChannelPointsMiner import TwitchChannelPointsMiner
from TwitchChannelPointsMiner.classes.Settings import Priority
from TwitchChannelPointsMiner.logger import LoggerSettings
from TwitchChannelPointsMiner.classes.entities.Bet import Strategy, BetSettings
from TwitchChannelPointsMiner.classes.entities.Streamer import Streamer, StreamerSettings
twitch_miner = TwitchChannelPointsMiner(
username="",
password="",
claim_drops_startup=True,
logger_settings=LoggerSettings(
save=True,
console_level=logging.INFO,
file_level=logging.DEBUG,
emoji=True,
less=True,
colored=True
),
streamer_settings=StreamerSettings(
make_predictions=True,
follow_raid=True,
claim_drops=True,
watch_streak=True,
bet=BetSettings(
strategy=Strategy.SMART,
percentage=10,
percentage_gap=20,
max_points=10,
)
),
priority=[ # Custom priority in this case for example:
Priority.STREAK
Priority.DROPS,
Priority.ORDER
],
)
twitch_miner.analytics(host="0.0.0.0", port=5000)
twitch_miner.mine(
followers=True # Automatic download the list of your followers
)
I don't know. Just try and figure out what's the problem. Can do a PR if you figure it.
Ohhhhh. got it....
I need use analytics after twitch_miner = TwitchChannelPointsMiner
setts and before twitch_miner.mine
After that i dont get duble logs
Big thanks !
Is than a bug or i did something wrong ?