๐ฆ This is a Deno runtime application that generates Discord profile cards, presenting users' activity and presence. Using the Discord API via the Discordeno library, the app serves user cards in SVG format.
Important
Current Nitro & Boosting badges do not work due to Discord API limitations, unless you currently have an animated avatar then the Nitro badge will be displayed correctly.
- โ Generate user cards with user presence and activities.
- ๐จ Customize user card appearance by providing query parameters.
- ๐ RESTful API to fetch user data and generate user cards.
- ๐ Error handling for various scenarios.
- ๐ No data tracking and no database required.
Join our Discord Server, without this you will not be able to use the website, Discord bot have to watch your profile and activities for this to work.
Important
If you leave the Discord server, the bot will no longer be able to watch your profile and activities, so the user card will not be generated.
Then, in your browser, go to https://discord-activity.deno.dev/api/:userId
and replace :userId
with your Discord user ID.
You will be shown a user card with your presence and activities. If you want to customize the appearance of the user card, you can do so by providing query parameters to the URL which are described in the Customizations section.
Note
If you don't know your Discord user ID, go to your Discord settings, then to the "Advanced" tab, scroll down and enable "Developer Mode". Then right-click on your profile and click "Copy ID".
You can also get raw user data in JSON format by going to https://discord-activity.deno.dev/api/raw/:userId
and replacing :userId
with your Discord user ID.
/api/:userId
: Generate a user card image with customizable appearance./api/raw/:userId
: Get raw user data in JSON format./badges/:badge
: Get a Discord badge image by name.
Note
You can customize the appearance of the user card by providing query parameters to the /api/:userId
endpoint.
Parameter | Description | Default |
---|---|---|
bgColor |
Background color of the user card. | #161a23 |
borderRadius |
Border radius of the user card. | 10 |
idleMessage |
Message to display when the user is idle. | There is nothing going on here! |
hideStatus |
Hide the status of the user. | false |
Warning
The bgColor
parameter must be a hexadecimal color code without the #
symbol. For example, #161a23
should be 161a23
.
URL
GET https://discord-activity.deno.dev/api/544164729354977282?bgColor=1b1c1e&borderRadius=0&idleMessage=I'm not doing anything&hideStatus=true
Query Parameters
bgColor: "1b1c1e"
borderRadius: 0
idleMessage: "I'm not doing anything"
hideStatus: true
Result
- Clone this repository
git clone https://github.com/IgorKowalczyk/discord-activity
- Fill environment variables in the
.env
file (see Environment Variables) - Run
deno task dev
to start the project in development mode ordeno task start
to run the project in production mode. - Visit
http://localhost:8080
in your browser
Note
Deno will automatically install all the project packages on the first run
- Fork this repository
- Create a new project on Deno Deploy
- Connect your forked repository to the project
- Click on the
Deploy
button - Fill environment variables in the project settings (see Environment Variables)
- Visit the generated URL in your browser
Variable | Description | Default | Required |
---|---|---|---|
TOKEN |
Discord Bot Token from the Discord Developer Portal. | โ | |
PORT |
Port on which the application will be running. | 3000 |
โ |
Note
You can see the .env.example
file for an example of how to fill in the environment variables.
Warning
In Deno Deploy, the PORT
variable is not required, because the port is assigned automatically!
If you come across any errors or have suggestions for improvements, please create a new issue here and describe it clearly.
When submitting a pull request, please follow these steps:
- Clone this repository
https://github.com/IgorKowalczyk/discord-activity.git
- Create a branch from
main
and give it a meaningful name (e.g.my-awesome-new-feature
). - Open a pull request on GitHub and clearly describe the feature or fix you are proposing.
This project is licensed under the MIT. See the LICENSE file for details