Merge remote-tracking branch 'origin/master'
# Conflicts: # src/main.py
This commit is contained in:
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -19,5 +19,8 @@
|
||||
"terminal.integrated.hideOnStartup": "always",
|
||||
"[jsonc]": {
|
||||
"editor.defaultFormatter": "vscode.json-language-features"
|
||||
},
|
||||
"files.exclude": {
|
||||
"**/__pycache__": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user