Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/main.py
This commit is contained in:
2026-03-18 17:16:33 +01:00
2 changed files with 8 additions and 1 deletions

View File

@@ -19,5 +19,8 @@
"terminal.integrated.hideOnStartup": "always", "terminal.integrated.hideOnStartup": "always",
"[jsonc]": { "[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features" "editor.defaultFormatter": "vscode.json-language-features"
},
"files.exclude": {
"**/__pycache__": true
} }
} }

View File

@@ -15,7 +15,10 @@ class CheckDiscord:
@staticmethod @staticmethod
def isdiscordrunning() -> bool: def isdiscordrunning() -> bool:
for process in psutil.process_iter(["name"]): for process in psutil.process_iter(["name"]):
if process.info["name"].lower() == "discord.exe": if (process.info["name"].lower() == "discord.exe" or
process.info["name"].lower() == "discordcanary.exe" or
process.info["name"].lower() == "discord" or
process.info["name"].lower() == "discord canary"):
return True return True
return False return False
@@ -23,6 +26,7 @@ class CheckDiscord:
def isuserconnected(clientid: str) -> bool: def isuserconnected(clientid: str) -> bool:
rpc = Presence(clientid) rpc = Presence(clientid)
try: try:
rpc.connect()
return True return True
except Exception: except Exception:
return False return False