Skip to content

Instantly share code, notes, and snippets.

@askrabal
Last active November 19, 2022 04:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save askrabal/0ad6dcaedae09bbbd0a867da5149f9aa to your computer and use it in GitHub Desktop.
Save askrabal/0ad6dcaedae09bbbd0a867da5149f9aa to your computer and use it in GitHub Desktop.
Working with discord on linux shell
# 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