mirror of
https://github.com/NovaOSS/violet.git
synced 2024-11-25 16:23:59 +01:00
20 lines
516 B
Python
20 lines
516 B
Python
# TODO Test this on Windows
|
|
|
|
import platform
|
|
import subprocess
|
|
|
|
# Check the operating system
|
|
os_name = platform.system()
|
|
|
|
# Set the Discord binary path based on the operating system
|
|
if os_name == 'Windows':
|
|
discord_path = 'C:\Program Files (x86)\Discord\Discord.exe'
|
|
elif os_name == 'Darwin': # macOS
|
|
discord_path = '/Applications/Discord.app/Contents/MacOS/Discord'
|
|
else:
|
|
# Assume Linux
|
|
discord_path = '/usr/bin/discord'
|
|
|
|
# Open Discord using the default binary path
|
|
subprocess.run([discord_path])
|