Discord PTB install script
From Pengwings
Installs Discord PTB into /opt/discord-ptb/ with main user having permissions to update without sudo
Before running do this
sudo mkdir /opt/discord-ptb sudo chown USERNAME:GROUP /opt/discord-ptb
Here's the script
echo "Remove any previous Discord PTB installation..." if [ -d /opt/discord-ptb ]; then pkill -9 DiscordPTB rm -rf /opt/discord-ptb/* fi echo "Downloading Discord PTB..." curl -L \ -H "Accept: application/octet-stream" \ "https://discord.com/api/download/ptb?platform=linux&format=tar.gz" \ -o discord-ptb.tar.gz echo "Installing Discord PTB..." tar -xzf discord-ptb*.tar.gz rm discord-ptb.tar.gz mv DiscordPTB/* /opt/discord-ptb/ rm -rf DiscordPTB if [ ! -f ~/.local/share/applications/discord-ptb.desktop ]; then echo "Creating desktop entry..." printf '%s\n' \ "[Desktop Entry]" \ "Name=Discord PTB" \ "Comment=Discord Public Test Build" \ "Exec=/opt/discord-ptb/DiscordPTB" \ "Icon=/opt/discord-ptb/discord.png" \ "Type=Application" \ "Categories=Network;InstantMessaging;" \ "StartupWMClass=discord-ptb" \ > ~/.local/share/applications/discord-ptb.desktop sudo update-desktop-database fi echo "Discord PTB installation complete"