Skip to content

Commit

Permalink
Merge pull request #17 from uzair-ashraf/YesVRC/ptb-canary
Browse files Browse the repository at this point in the history
Support for PTB and Canary
  • Loading branch information
shadorki authored Jan 18, 2023
2 parents d047541 + 944ec88 commit 38e1305
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__pycache__
build
vrc-discord-osc.config.json
vrc-discord-osc.config.json
*.spec
4 changes: 3 additions & 1 deletion discord_band.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 38e1305

Please sign in to comment.