From 944ec88bcdafd09c9b808790bf3bd22a6a0dc70d Mon Sep 17 00:00:00 2001 From: Yes <85800291+YesVRC@users.noreply.github.com> Date: Mon, 16 Jan 2023 12:08:16 -0500 Subject: [PATCH] Support for PTB and Canary --- .gitignore | 3 ++- discord_band.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 279fa57..026362f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ __pycache__ build -vrc-discord-osc.config.json \ No newline at end of file +vrc-discord-osc.config.json +*.spec diff --git a/discord_band.py b/discord_band.py index f93e93d..4e2d19e 100644 --- a/discord_band.py +++ b/discord_band.py @@ -13,6 +13,7 @@ def __init__(self, port: int): self.disable_timer = 0 self.thread = Thread(target=self.run) self.thread.start() + self.versions = ["Discord", "Discord Canary", "Discord PTB"] def is_call_notification(self, notification: UserNotification) -> bool: try: @@ -36,7 +37,8 @@ def is_discord_notification(self, notification: UserNotification) -> bool: try: if hasattr(notification, "app_info"): app_name = notification.app_info.display_info.display_name - if app_name == "Discord": + if app_name in self.versions: + print(f'Notification from {app_name}') return True return False except AttributeError: