GithubHelp home page GithubHelp logo

cnrad / lanyard-profile-readme Goto Github PK

View Code? Open in Web Editor NEW
714.0 6.0 93.0 1.56 MB

๐Ÿท๏ธ Utilize Lanyard to display your Discord Presence in your GitHub Profile

Home Page: https://lanyard.cnrad.dev

JavaScript 0.04% TypeScript 99.96%

lanyard-profile-readme's Introduction

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 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 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

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

Hide App by ID

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

Hide Discriminator (DEPRECATED soon)

If you don't want people seeing your discriminator (most likely for privacy reasons), append the query param hideDiscrim=true to the end of the URL. Your discriminator is shown by default.

Example URL and result

[![Discord Presence](https://lanyard-profile-readme.vercel.app/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 :)

lanyard-profile-readme's People

Contributors

barbarbar338 avatar brokiem avatar callumok2004 avatar cnrad avatar dustinrouillard avatar gravityscriptsv2 avatar hexiro avatar leonardssh avatar looskie avatar malloryhayr avatar n0chteil avatar nightfeather0615 avatar plskz avatar pxseu avatar v4ltages avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

lanyard-profile-readme's Issues

Cutting off on mobile screen

The card cuts off for some reason on my phone (Safari, iPhone 13). It seems like it's just unable to resize for whatever reason. I tried adding width="10%" and that just cut it off even more instead of resizing it. Any ideas why this might be happening/if it's fixable?

image

[SUGGESTION] Custom image backgrounds

Basically like bg=:color except instead of :color it'd be :image_url.
Could maybe even default to using the user's Discord profile banner (Nitro or not [users without Nitro get a colored banner that best reflects their profile picture]).

Example of what it'd look like (when set to default for a Nitro user):
image

For reference, this is my Discord profile:
image

Lanyard displays broken image when playing imported songs on spotify

As the title suggests, if you're trying to play imported MP3s on Spotify, it displays a broken image icon since locally imported song art doesn't get uploaded to Spotify.

Screenshot:
image

My recommendation is to add placeholder images for songs that don't have album art (imported songs)

Disable Nitro Badge for Animated Profile Pictures

The Nitro badge looks a little too much to the right on my profile.

Also, a little annoying how it appears and disappears based when I change my profile picture (based on whether it is static or animated).

Wondering if there could be a toggle to let us decide whether to show the Nitro badge while we have an animated profile picture?

[Suggestion] Add a param to ignore Spotify.

Since Spotify does not have an application ID, it is not possible to hide it.

My original thought was that if we use the activity name for spotify and just ignore it by using param ignoreSpotify=True for example.
At least that's what I would've done but since I have no experience with managing API's in typescript, all I can do is give a suggestion.

if (activity.name.toLowerCase().includes('spotify')) {
        // Ignore Spotify
        return;

Display Name

The display name parameter did not seem to work for me. Is the documentation outdated? Also, it says that while enabled, both the display name and the username will be visible. Could we please have an option that lets us show just one of them? In my case, the username is error but I prefer to display Error with the first letter capitalized.

Exclude App IDs

Add a URL query parameter to exclude a certain app id for the presence section.
I.E. you want to hide a custom presence to show games or music

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.