Console report enhantment
Settings.logger.less now affect final report Streamer.print_history() tweak for more readability. before "if Settings.logger.less = True": --- alot of annoing bet information --- dd/mm hh:mm:ss - 🤖 Streamer(username=streamer, channel_id=12345678, channel_points=112.06k), Total Points Gained (after farming - before farming): 70 dd/mm hh:mm:ss - 💰 CLAIM (1 times, 50 gained), WATCH (2 times, 20 gained) after: dd/mm hh:mm:ss - 💰 streamer (112.06k points), Total Points Gained: 70 CLAIM (1 times, 50 gained) WATCH (2 times, 20 gained)
This commit is contained in:
@@ -456,7 +456,7 @@ class TwitchChannelPointsMiner:
|
||||
extra={"emoji": ":hourglass:"},
|
||||
)
|
||||
|
||||
if self.events_predictions != {}:
|
||||
if not Settings.logger.less and self.events_predictions != {}:
|
||||
print("")
|
||||
for event_id in self.events_predictions:
|
||||
event = self.events_predictions[event_id]
|
||||
@@ -485,12 +485,17 @@ class TwitchChannelPointsMiner:
|
||||
self.streamers[streamer_index].channel_points
|
||||
- self.original_streamers[streamer_index]
|
||||
)
|
||||
|
||||
streamer_gain = (
|
||||
f"{self.streamers[streamer_index]}, Total Points Gained: {_millify(gained)}"
|
||||
if Settings.logger.less
|
||||
else f"{repr(self.streamers[streamer_index])}, Total Points Gained (after farming - before farming): {_millify(gained)}"
|
||||
)
|
||||
|
||||
# i think there are better solution but it's work like it supposed
|
||||
streamer_history = f"\t\t\t{"\n\t\t\t".join(self.streamers[streamer_index].print_history().split("; "))}"
|
||||
|
||||
logger.info(
|
||||
f"{repr(self.streamers[streamer_index])}, Total Points Gained (after farming - before farming): {_millify(gained)}",
|
||||
extra={"emoji": ":robot:"},
|
||||
f"{streamer_gain}\n{streamer_history}",
|
||||
extra={"emoji": ":moneybag:"},
|
||||
)
|
||||
if self.streamers[streamer_index].history != {}:
|
||||
logger.info(
|
||||
f"{self.streamers[streamer_index].print_history()}",
|
||||
extra={"emoji": ":moneybag:"},
|
||||
)
|
||||
|
||||
@@ -149,9 +149,9 @@ class Streamer(object):
|
||||
)
|
||||
|
||||
def print_history(self):
|
||||
return ", ".join(
|
||||
return "; ".join(
|
||||
[
|
||||
f"{key}({self.history[key]['counter']} times, {_millify(self.history[key]['amount'])} gained)"
|
||||
f"{key} ({self.history[key]['counter']} times, {_millify(self.history[key]['amount'])} gained)"
|
||||
for key in sorted(self.history)
|
||||
if self.history[key]["counter"] != 0
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user