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",
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"files.exclude": {
"**/__pycache__": true
}
}

View File

@@ -15,7 +15,10 @@ class CheckDiscord:
@staticmethod
def isdiscordrunning() -> bool:
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 False
@@ -23,6 +26,7 @@ class CheckDiscord:
def isuserconnected(clientid: str) -> bool:
rpc = Presence(clientid)
try:
rpc.connect()
return True
except Exception:
return False