Discord PTB install script: Difference between revisions
From Pengwings
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
From here https://gist.github.com/felipelima94/7791a4243a73a07fd95e90758607267a | |||
Installs Discord PTB into /opt/discord-ptb/ with main user having permissions to update without sudo | Installs Discord PTB into /opt/discord-ptb/ with main user having permissions to update without sudo | ||
Revision as of 17:13, 8 February 2026
From here https://gist.github.com/felipelima94/7791a4243a73a07fd95e90758607267a
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"