MCPcopy Index your code
hub / github.com/cnrad/lanyard-profile-readme

github.com/cnrad/lanyard-profile-readme @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
35 symbols 74 edges 21 files 0 documented · 0% updated 3mo ago★ 8676 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

❗ IMPORTANT ❗

If you are using lanyard-profile-readme.vercel.app, change it to lanyard.cnrad.dev at your earliest convenience!

lanyard-profile-readme

🏷️ Utilize Lanyard to display your Discord Presence in your GitHub Profile

Special thanks to @Phineas for creating Lanyard, and making this project possible

Usage

First, join the Lanyard Discord (if you haven't already) for this to work.

In a README.md file, include the following, replacing :id with your Discord user ID:

[![Discord Presence](https://lanyard.cnrad.dev/api/:id)](https://discord.com/users/:id)

It should display something similar to the following (I am using my Discord user ID as an example):

Discord Presence

When others click it, they will be directed to your actual Discord profile. Neat!

Options

There are a few options to customize this display using query parameters:

Theme

Append the query param theme=:theme to the end of the URL, replacing :theme with either light or dark. This will change the background and the font colors, but the background can be overridden with the Background Color parameter.

Background Color

Append the query param bg=:color to the end of the URL, replacing :color with a hex color of your choice (omit the #)

Border Radius

Append the query param borderRadius=:radius to the end of the URL, replacing :radius with a radius of your choice. (default 10px)

Toggle Animated Avatar

If you have an animated avatar, append the query param animated=:bool to the end of the URL, replacing :bool with true or false. This is set to true by default.

Custom Idle Message

If you don't want the default "I'm not currently doing anything!" as your idle message, you can change it by appending idleMessage=:yourmessage to the end of the URL.

Show Display Name

If you'd like to show your global display name as well as your username, append the query param showDisplayName=true to the end of the URL. This is set to false by default.

Hide Avatar Decoration

If you don't want people seeing your Avatar Decoration, append the query param hideDecoration=true to the end of the URL. Your Avatar Decoration is shown by default if you have one.

Enable Animated Avatar Decoration

If you have an Animated Avatar Decoration, append the query param animatedDecoration=true to the URL. This is set to false by default to minimize response size.

Hide Status

If you don't want people seeing your status, append the query param hideStatus=true to the end of the URL. Your status is shown by default if you have one.

Hide Elapsed Time

If you don't want people seeing the elapsed time on an activity, append the query param hideTimestamp=true to the end of the URL. Elapsed time is shown by default.

Hide Server Tag

If you don't want people seeing your Server Tag (formerly known as Clan/Guild Tag), append the query param hideTag=true to the end of the URL. Server Tag is shown by default.

Hide Badges

If you don't want people seeing the badges you have on Discord, append the query param hideBadges=true to the end of the URL. Badges are shown by default.

Hide Profile

If you don't want people seeing the profile you have on Discord, append the query param hideProfile=true to the end of the URL. Profile are shown by default.

Hide Activity

If you don't want people seeing the your activity, append the query param hideActivity=true to the end of the URL or use hideActivity=whenNotUsed to hide activity section when there's no activity to display. Activity are shown by default.

Hide Spotify / Apple Music

If you don't want people seeing your music activity, append the query param hideSpotify=true or hideAppleMusic=true to the end of the URL. Music activity is shown by default.

Hide App by ID

If you don't want to display a specific application, append the query param ignoreAppId=:app_id to the end of the URL, IDs separate by ,.

Example URL and result

[![Discord Presence](https://lanyard.cnrad.dev/api/94490510688792576?theme=light&bg=809ecf&animated=false&hideDiscrim=true&borderRadius=30px&idleMessage=Probably%20doing%20something%20else...)](https://discord.com/users/94490510688792576)

Discord Presence

\ Note: Current Nitro & Boosting badges do not work due to Discord API limitations, unless you currently have an animated avatar, in which case it will display the Nitro badge.

If you're using this in your profile, feel free to show support and give this repo a ⭐ star! It means a lot, thank you :)

Extension points exported contracts — how you extend this code

CloudflareEnv (Interface)
(no doc)
cloudflare-env.d.ts
ProfileCardProps (Interface)
(no doc)
src/components/ProfileCard.tsx
Root (Interface)
(no doc)
src/utils/LanyardTypes.ts
Data (Interface)
(no doc)
src/utils/LanyardTypes.ts
Spotify (Interface)
(no doc)
src/utils/LanyardTypes.ts
Timestamps (Interface)
(no doc)
src/utils/LanyardTypes.ts
DiscordUser (Interface)
(no doc)
src/utils/LanyardTypes.ts

Core symbols most depended-on inside this repo

parseBool
called by 12
src/utils/extractSearchParams.ts
encodeBase64
called by 9
src/utils/toBase64.ts
cn
called by 6
src/utils/helpers.ts
isSnowflake
called by 3
src/utils/snowflake.ts
ProfileCard
called by 1
src/components/ProfileCard.tsx
parseAppId
called by 1
src/utils/extractSearchParams.ts
extractSearchParams
called by 1
src/utils/extractSearchParams.ts
fetchUserImages
called by 1
src/utils/fetchUserImages.ts

Shape

Function 21
Interface 14

Languages

TypeScript100%

Modules by API surface

src/utils/LanyardTypes.ts12 symbols
src/utils/helpers.ts4 symbols
src/utils/extractSearchParams.ts3 symbols
src/components/ProfileCard.tsx3 symbols
src/components/Popover.tsx3 symbols
src/app/page.tsx3 symbols
src/utils/toBase64.ts1 symbols
src/utils/snowflake.ts1 symbols
src/utils/fetchUserImages.ts1 symbols
src/utils/actions.ts1 symbols
src/app/layout.tsx1 symbols
src/app/api/[id]/route.ts1 symbols

For agents

$ claude mcp add lanyard-profile-readme \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page