Discord: Difference between revisions
m Discord community nowadays expands much more outside of gaming, and their marketing has shifted from gamers to the general public. |
No edit summary |
||
| (21 intermediate revisions by 13 users not shown) | |||
| Line 1: | Line 1: | ||
{{ | {{Infobox application | ||
Discord is an instant messaging and VoIP application with lots of functionality | | name = Discord | ||
| image = Discord.svg | |||
| type = instant messaging and VoIP social platform | |||
| developer = Discord Inc. | |||
| platform = Cross-platform (Linux, macOS, Windows, Web) | |||
| github = discord | |||
| website = https://discord.com/ | |||
}} | |||
Discord is an instant messaging and VoIP application with lots of functionality. It provides a web interface, though most users would prefer to use a client for interoperability with their system. | |||
== Installation == | == Installation == | ||
=== Official Clients === | |||
{{tip/unfree}} | |||
Nixpkgs provides all three of Discord's release channels: <code>pkgs.discord</code>, <code>pkgs.discord-ptb</code>, and <code>pkgs.discord-canary</code>. Add any of these packages in <code>environment.systemPackages</code> or <code>users.users.<name>.packages</code>. | |||
{{file|configuration.nix|nix|3= | |||
{ config, lib, pkgs, ... }: { | |||
... | |||
# This installs Discord PTB only for the user "alice" | |||
users.users.alice.packages = with pkgs; [ | |||
discord-ptb | |||
]; | |||
# This will install Discord PTB for all users of the system | |||
environment.systemPackages = with pkgs; [ | |||
discord-ptb | |||
]; | |||
} | |||
}} | |||
=== Unofficial Clients === | |||
{{Warning|Use of unofficial clients goes against Discord's [https://discord.com/terms TOS] and possesses the risk of permanently suspending your account from the platform!}} | |||
Nixpkgs also provides a vast variety of community developed/modded Discord clients, which can usually serve as drop-in replacements for the official discord client with an extended set of features. | |||
'''Legcord<ref>https://github.com/Legcord/Legcord</ref>''' is a lightweight alternative desktop client featuring built-in modding extensibility via Vencord and Equicord. Provided via <code>pkgs.legcord</code>. | |||
< | |||
</ | |||
'''GoofCord<ref>https://github.com/Milkshiift/GoofCord</ref>''' is a security oriented fork of Legcord. Provided via <code>pkgs.goofcord</code>. | |||
'''BetterDiscord<ref>https://github.com/BetterDiscord/BetterDiscord</ref>''' enhances Discord desktop app with new features. Installer provided via <code>pkgs.betterdiscordctl</code>, but users may prefer to instead run it one-off via cli: | |||
<syntaxhighlight lang=console> | |||
$ nix-shell -p betterdiscordctl --command 'betterdiscordctl install' # nix-legacy | |||
$ nix run nixpkgs#betterdiscordctl -- install # nix3 | |||
$ nix-shell -p betterdiscordctl --command 'betterdiscordctl self-upgrade' # nix-legacy | |||
$ nix run nixpkgs#betterdiscordctl -- self-upgrade # nix3 | |||
</syntaxhighlight> | </syntaxhighlight> | ||
{{ | '''OpenAsar<ref>https://github.com/GooseMod/OpenAsar</ref>''' is an open-source alternative to Discord's <code>app.asar</code>. Provided via <code>pkgs.openasar</code> without usable client. Users should instead prefer to override the official discord package and add <code>withOpenASAR = true</code>: | ||
{{file|configuration.nix|nix|3= | |||
{ config, lib, pkgs, ... }: { | |||
... | |||
environment.systemPackages = with pkgs; [ | |||
(discord.override { | |||
withOpenASAR = true; | |||
# withVencord = true; # complementary | |||
}) | |||
]; | |||
} | |||
}} | |||
=== | '''Vencord<ref>https://github.com/Vendicated/Vencord</ref>''', the cutest Discord client mod. Provided via <code>pkgs.vencord</code>. Standalone can be installed by overriding the official Discord package via <code>withVencord = true</code>: | ||
{{file|configuration.nix|nix|3= | |||
{ config, lib, pkgs, ... }: { | |||
... | |||
environment.systemPackages = with pkgs; [ | |||
(discord.override { | |||
# withOpenASAR = true; # complementary | |||
withVencord = true; | |||
}) | |||
]; | |||
} | |||
}} | |||
'''Vesktop<ref>https://github.com/Vencord/Vesktop</ref>''' is a customizable and privacy friendly desktop app by the developers of Discord's cutest client mod. Provided via <code>pkgs.vesktop</code>. Can be configured in [[Home Manager]]: | |||
{{file|home.nix|nix|3= | |||
{ config, lib, pkgs, ... }: { | |||
... | |||
programs.vesktop = { | |||
enable = true; | |||
vencord.settings = { | |||
autoUpdate = true; | |||
autoUpdateNotification = true; | |||
notifyAboutUpdates = true; | |||
plugins = { | |||
ClearURLs.enabled = true; | |||
FixYoutubeEmbeds.enabled = true; | |||
}; | |||
}; | |||
}; | |||
} | |||
}} | |||
'''Equicord<ref>https://github.com/equicord/equicord</ref>''', other cutest Discord client mod. Provided via <code>pkgs.equicord</code>. | |||
'''Equibop<ref>https://github.com/Equicord/equibop</ref>''', a Vesktop fork by Equicord developers. Provided via <code>pkgs.equibop</code>. | |||
'''Dissent<ref>https://github.com/diamondburned/dissent</ref>''' is a simple, practical Discord client prioritizing speed over feature completeness. Provided via <code>pkgs.dissent</code>. | |||
'''Discordo<ref>https://github.com/ayn2op/discordo</ref>''' is a TUI Discord client provided via <code>pkgs.discordo</code>. ''Development in progress, possible crashes and breaking changes.'' | |||
'''Webcord<ref>https://github.com/SpacingBat3/WebCord</ref>''' is a Discord and [https://spacebar.chat/ Spacebar] client implemented without using official Discord API. Provided via <code>pkgs.webcord</code>. | |||
'''Ripcord<ref>https://cancel.fm/ripcord/</ref>''' is an unfree client for Discord and [https://slack.com/intl/ Slack] with a traditional compact interface for power users. Provided via <code>pkgs.ripcord</code>. | |||
== Troubleshooting == | |||
=== | === Wayland screen sharing === | ||
Since December 2024, Discord Canary supports screen sharing on Wayland. Alternatively, you can use the web version on a browser that supports screen sharing on Wayland, or an [[Discord#Unofficial Clients|unofficial client]] like ''Webcord'' or ''Vesktop'', both of which have fixed this issue in their own ways. | |||
{{Note|Remember to configure an [https://wiki.archlinux.org/title/XDG_Desktop_Portal#List_of_backends_and_interfaces XDG Desktop Portal] with screen cast capabilities!}} | |||
[[ | === Notifications-related crash === | ||
Discord will crash if there is no compatible notification daemon running. This issue is only prevalent in custom desktop environments, such as [[Sway]] or [[Hyprland]]. Comprehensive documentation usually exists for most window managers/compositors and can be found on their respective wikis. Nixpkgs provides a few standalone notification daemons such as <code>pkgs.dunst</code> and <code>pkgs.mako</code>. You may optionally use a notification daemon from a larger DE, such as <code>pkgs.lxqt.lxqt-notificationd</code>, however it is unclear how effective these will be outside of their normal environment. | |||
{{file|configuration.nix|nix|3= | |||
{ config, lib, pkgs, ... }: { | |||
... | |||
# You will need to add a call for the daemon to actually function. | |||
# This is usually done within the configuration of your respective WM. | |||
# See the official wiki/documentation for your WM for more info. | |||
environment.systemPackages = with pkgs; [ | |||
mako | |||
]; | |||
} | |||
}} | |||
Discord | === Start-up crash === | ||
Occasionally, Discord's code can become corrupted, causing it to crash on start-up. You can force it to re-download the latest version by deleting the <code>~/.config/discord/1.0.138</code>directory, where <code>1.0.138</code> is replaced with Discord's current version number (the second line of output when running <code>discord</code> from a terminal). | |||
=== "Must be your lucky day" === | |||
Although Nixpkgs is usually very fast with updates (if you use ''nixos-unstable''), you may still run into this issue intermittently. You may override the discord package with a more up-to-date source, or you may disable this popup entirely by adding <code>"SKIP_HOST_UPDATE": true</code> to <code>~/.config/discord/settings.json</code>: | |||
{{file|~/.config/discord/settings.json|json| | |||
{ | { | ||
"SKIP_HOST_UPDATE": true | |||
}</ | <nowiki>}</nowiki> | ||
}} | |||
=== Krisp noise suppression === | |||
The Krisp noise suppression option will not work on NixOS because the Discord binary is patched before installation, and there is a DRM-style integrity check in the Krisp binary which prevents Krisp from working if the Discord binary is modified. See https://github.com/NixOS/nixpkgs/issues/195512 for details. | |||
==== Python script workaround ==== | |||
{{Warning|The usage of such modifications goes against Discord's [https://discord.com/terms Terms of Service] and Krisp's [https://krisp.ai/terms-of-use/ Terms of Use] and can result in your Discord account being terminated and/or being banned from using Krisp's services!}} | |||
One way to enable Krisp noise suppression is by patching the <code>discord_krisp.node</code> binary to bypass its DRM verification. Below is a Nix configuration that creates a Python script that patches the binary by modifying specific bytes to bypass the license check: | |||
<syntaxhighlight lang="nixos"> | |||
<syntaxhighlight lang=" | { pkgs, ... }: | ||
let | |||
krisp-patcher = | |||
pkgs.writers.writePython3Bin "krisp-patcher" | |||
{ | |||
libraries = with pkgs.python3Packages; [ | |||
capstone | |||
pyelftools | |||
]; | |||
flakeIgnore = [ | |||
"E501" # line too long (82 > 79 characters) | |||
"F403" # 'from module import *' used; unable to detect undefined names | |||
"F405" # name may be undefined, or defined from star imports: module | |||
]; | |||
} | |||
( | |||
builtins.readFile ( | |||
pkgs.fetchurl { | |||
url = "https://pastebin.com/raw/8tQDsMVd"; | |||
sha256 = "sha256-IdXv0MfRG1/1pAAwHLS2+1NESFEz2uXrbSdvU9OvdJ8="; | |||
} | |||
) | |||
); | |||
in | |||
{ | |||
environment.systemPackages = [ | |||
krisp-patcher | |||
]; | |||
} | |||
</syntaxhighlight> | </syntaxhighlight> | ||
{{Note|As of version 0.0.76, the script works. But, future versions of Discord may break the script. Therefore, you should not rely on this script for long-term use. For the latest updates and more details, follow https://github.com/NixOS/nixpkgs/issues/195512.}} | |||
After adding this to your Nix configuration and rebuilding, make sure Discord is completely closed, and then run: | |||
<syntaxhighlight lang=console> | |||
<syntaxhighlight lang= | $ krisp-patcher ~/.config/discord/0.0.76/modules/discord_krisp/discord_krisp.node | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Once you restart Discord and join a VC, you should see a sound wave icon to the left of the hangup icon. | |||
=== Text-to-Speech === | === Text-to-Speech === | ||
| Line 135: | Line 193: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== | === Discord RPC not functioning === | ||
Install '''arRPC'''<ref>https://github.com/OpenAsar/arrpc</ref>: | |||
{{file|configuration.nix|nix|3= | |||
{ pkgs, ... }: { | |||
... | |||
enviroment.systemPackages = with pkgs; [ | |||
arrpc | |||
]; | |||
systemd.packages = with pkgs; [ | |||
arrpc | |||
]; | |||
} | |||
}} | |||
Or add the following to your Home Manager configuration: | |||
{{file|home.nix|nix|3= | |||
{ pkgs, ... }: { | |||
... | |||
services.arrpc = { | |||
enable = true; | |||
package = pkgs.arrpc; # Default | |||
systemdTarget = "graphical-session.target"; # default | |||
}; | |||
} | |||
}} | |||
[[Category:Applications]] | [[Category:Applications]] | ||
[[Category:Gaming]] | [[Category:Gaming]] | ||