Discord PTB install script

From Pengwings
Revision as of 17:10, 8 February 2026 by Theleruby (talk | contribs) (Created page with " 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 Discor...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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"