Last active
November 19, 2022 04:47
-
-
Save askrabal/0ad6dcaedae09bbbd0a867da5149f9aa to your computer and use it in GitHub Desktop.
Working with discord on linux shell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# installing discord from shell | |
cd ~/Downloads | |
wget -O discord.deb 'https://discord.com/api/download?platform=linux&format=deb' | |
sudo apt update | |
sudo apt install ./discord.deb | |
# check if discord is running | |
pgrep -af discord | |
# killing discord and restarting it | |
killall Discord #may want to repeat a few times | |
# removing discord config that sometimes fixes things??? | |
rm -rf ~/.config/discord | |
#python disable update check, creates files and folders if they don't exist | |
python3 <<EOF | |
import json | |
from pathlib import Path | |
s = Path('~/.config/discord/settings.json').expanduser().resolve() | |
s.parent.mkdir(parents=True, exist_ok=True) | |
s.touch() | |
with s.open('r+') as fd: | |
try: | |
x = json.load(fd) | |
except (json.JSONDecodeError,): | |
x = {} | |
x.update({'SKIP_HOST_UPDATE':True}) | |
json.dump(x, fd) | |
print(x) | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment