Discord has integrations with other apps, including Twitch and Spotify. These can show what you’re streaming, or what you’re listening to, respectively. Discord can also detect what game you’re playing and display that. All of this information will appear under your name in any server that you’re in.
To show what game you’re playing, open your settings (next to your name and profile image in the bottom left corner) and navigate to Game Activity. Then just make sure the “Display currently running game as status message” is checked. And that’s it! If Discord does not recognize your game for some reason, or you’d like to add a custom program, you can do so from this screen as well, if Discord is not currently detecting a game.
To enable third-party integrations like Spotify and Twitch, go to settings and navigate to Connections. Here you can manually add and connect any apps that you’d like to. Just make sure that any checkboxes in the Connections section are checked that indicate sharing information. For example, Spotify has a checkbox option that says “Display Spotify as your status”. Enabling this will show what you’re listening to on Spotify, to others in Discord.