diff --git a/TwitchChannelPointsMiner/classes/WebSocketsPool.py b/TwitchChannelPointsMiner/classes/WebSocketsPool.py index 8c14077..d860865 100644 --- a/TwitchChannelPointsMiner/classes/WebSocketsPool.py +++ b/TwitchChannelPointsMiner/classes/WebSocketsPool.py @@ -293,9 +293,8 @@ class WebSocketsPool: "REFUND", -points_placed, counter=-1, - create_if_missing=False, ) - else: + elif result_type == "WIN": logger.info( "REMOVE PREDICTION FROM POINTS MSG" ) # TODO remove @@ -303,7 +302,6 @@ class WebSocketsPool: "PREDICTION", -points_won, counter=-1, - create_if_missing=False, ) elif message.type == "prediction-made": event_prediction.bet_confirmed = True diff --git a/TwitchChannelPointsMiner/classes/entities/Streamer.py b/TwitchChannelPointsMiner/classes/entities/Streamer.py index 301aa57..a97b774 100644 --- a/TwitchChannelPointsMiner/classes/entities/Streamer.py +++ b/TwitchChannelPointsMiner/classes/entities/Streamer.py @@ -91,10 +91,8 @@ class Streamer(object): ] ) - def update_history(self, reason_code, earned, counter=1, create_if_missing=True): + def update_history(self, reason_code, earned, counter=1): if reason_code not in self.history: - if not create_if_missing: - return self.history[reason_code] = {"counter": 0, "amount": 0} self.history[reason_code]["counter"] += counter self.history[reason_code]["amount"] += earned