diff --git a/hypickle/Player.py b/hypickle/Player.py index ccaa4de..9ceaaf8 100644 --- a/hypickle/Player.py +++ b/hypickle/Player.py @@ -288,9 +288,11 @@ def print_dict_report(self, report: dict, output_online_status: bool = False) -> print(f" friended {time_friended}".ljust(20), end='') print(recent_game_msg, end='') if output_online_status: - if is_online := self.hypixel_object().isOnline((True,)*3): - Utils.speak(f"{self.name()} is online") + is_online = self.hypixel_object().isOnline((True,)*3) print(f"this arg player is {'online' if is_online else 'offline'}", end='') + if is_online: + Utils.speak(f"{self.name()} is online" + + (f" and {recent_game_msg}" if recent_game_msg else '')) if not just_uuids and (updated_json := self.hypixel_object().updated_json) is not None: print(f" (updated player json obtained {updated_json[1].strftime('%I:%M:%S %p')})", end='') print() diff --git a/hypickle/Utils.py b/hypickle/Utils.py index 85fb7f3..38e291d 100644 --- a/hypickle/Utils.py +++ b/hypickle/Utils.py @@ -284,5 +284,4 @@ def speak(text: str) -> None: talker.setProperty('volume', 0.2) talker.setProperty('rate', 160) talker.say(text) - talker.runAndWait() - sleep(0.5) \ No newline at end of file + talker.runAndWait() \ No newline at end of file diff --git a/ideas.txt b/ideas.txt index be728cd..84eb584 100644 --- a/ideas.txt +++ b/ideas.txt @@ -21,8 +21,6 @@ - Also once lintception is updated with allowing the user to specify certain files that should be empty, specify the __init__.py in the hypickle folder. - # If an arg player is online, output a voice message for their most recent game as well. - # If an arg player is online and their recentgames list has a new first dict, voice-output that they've entered/exited a game since the last check. # Would have to keep track of the result from the previous call to the recentgames endpoint.