• Stars
    star
    205
  • Rank 191,264 (Top 4 %)
  • Language
    JavaScript
  • License
    GNU General Publi...
  • Created over 3 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A customizable badge displaying your Discord account, a server invite, or a bot account.

Discord Markdown badge

A customizable badge that shows your Discord account, a server invite, or a bot account.

User account Server invite Bot account

Set up

The set up process will vary depending on the use:

User account   

  1. Join the Discord server (required, as that's where the bot gets your presence information from)
  2. Your shield will become available at https://dcbadge.vercel.app/api/shield/USERID
    (replace USERID with your Discord user ID)

To embed it in the readme, insert it like this:
![](https://dcbadge.vercel.app/api/shield/USERID)

Server invite   

  1. Create an invite for your server; make sure to disable expiration!
  2. Your shield will become available at https://dcbadge.vercel.app/api/server/INVITEID
    (replace INVITEID with the invite id (https://discord.gg/INVITEID)

To embed it in the readme, insert it like this:
[![](https://dcbadge.vercel.app/api/server/INVITEID)](https://discord.gg/INVITEID)

Bot account   

  1. DM me () your bot's invite link
  2. Wait for me to read the DM (it might take some time as it's a manual process)
  3. Your shield will become available at https://dcbadge.vercel.app/api/shield/BOTID?bot=true
    (replace BOTID with your Discord bot's user ID)

To embed it in the readme, insert it like this:
![](https://dcbadge.vercel.app/api/shield/BOTID?bot=true)

Styling

You can chain parameters by connecting them with & (e.g. ?style=flat&theme=clean&compact=true).

style

This uses shields.io to generate the badge, so you can choose one of the styles from there by appending ?style= to the url.

Badge Style Query
flat flat ?style=flat
flat-square flat-square ?style=flat-square
for-the-badge (default) for-the-badge None (default)
plastic plastic ?style=plastic
social social ?style=social

theme

You can also use the theme query option to change the colors of the shield

In the following themes the green color gets replaced by the color corresponding to your presence (green, yellow, red, and grey, for online, idle, do not disturb, and offline, respectively)

Badge Theme Query
default Default None (default)
default-inverted Default inverted ?theme=default-inverted
clean Clean ?theme=clean
clean-inverted Clean inverted ?theme=clean-inverted
dc Discord ?theme=discord
dc-inverted Discord inverted ?theme=discord-inverted
full-presence Full presence ?theme=full-presence
grey Gray ?theme=gray
blurple Blurple ?theme=blurple

Note: the theme option will not work with the social style.

compact

Makes the badge more compact, but loses the online status text/server member count

Badge Query
compact ?compact=true

logoColor

You can pass a color for the logo (the examples below use &theme=default-inverted to make the change more evident)

Badge Query Description
presence ?logoColor=presence Changes the color of the logo according to the presence
word ?logoColor=pink Supported colors here
hex ?logoColor=ff6b6b Any hex code, without the #

I've added this to my GitHub bio and it doesn't work!

This won't work in bios, only in profile readmes (and any other part of GitHub that supports markdown). Here's some info on what a profile readme is and how to set it up.

For any questions feel free to contact me (, [email protected])

HTML

The API returns an SVG image, so you can embed it in your html just like you would with any other svg.

<img src="https://dcbadge.vercel.app/api/shield/USERID" />