Discord Profile Markdown badge
Add to your GitHub readme a badge that shows your Discord username and presence!
Set up
-
Join the Discord server (required, as that's where the bot gets your presence information from)
-
Add to your readme
![](https://discord-md-badge.vercel.app/api/shield/USERID)
replacing
USERID
with your Discord user ID (e.g.![](https://discord-md-badge.vercel.app/api/shield/852977967776399400)
)
Done! (Make sure not to leave the server, or this will break)
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 | ?style=flat |
|
flat-square | ?style=flat-square |
|
for-the-badge | None (default) | |
plastic | ?style=plastic |
|
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)
Note: the theme
option will not work with the social style
.
compact
Badge | Query |
---|---|
?compact=true |
logoColor
You can pass a color for the logo (the examples below also use &theme=default-inverted
to show the color better)
Badge | Query | Description |
---|---|---|
?logoColor=presence |
Changes the color of the logo according to the presence | |
?logoColor=orange |
Supported colors here | |
?logoColor=ae81ce |
Any hex code, without the # |
Endpoints
(Preceded by https://discord-md-badge.vercel.app/api
)
Endpoint | Description | Example response |
---|---|---|
/shield/USERID |
returns a shield in the SVG format | |
/shield/json/USERID |
returns the raw JSON used to generate the shields | { "t": "MDbot#9808", "p": "online" } |