Discord PTB install script: Difference between revisions

From Pengwings
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..."
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
Based on this script here https://gist.github.com/felipelima94/7791a4243a73a07fd95e90758607267a with small edits
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..."
  echo "Remove any previous Discord PTB installation..."
  if [ -d /opt/discord-ptb ]; then
  if [ -d /opt/discord-ptb ]; then
Line 35: Line 44:
   
   
  echo "Discord PTB installation complete"
  echo "Discord PTB installation complete"
You can avoid the "Must be your lucky day" update prompt by editing this file:
~/.config/discordptb/settings.json
And adding this to the json data:
"SKIP_HOST_UPDATE": true

Latest revision as of 06:22, 14 April 2026

Based on this script here https://gist.github.com/felipelima94/7791a4243a73a07fd95e90758607267a with small edits

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"

You can avoid the "Must be your lucky day" update prompt by editing this file:

~/.config/discordptb/settings.json

And adding this to the json data:

"SKIP_HOST_UPDATE": true