Distivity is a modern RESTful API that allows you to get presence details of a Discord account by ID. It provides endpoints to fetch user information, avatars, banners, and status.
- GET /: Returns basic information about the API.
- GET /user/:id: Fetches detailed information about a user by their Discord ID.
- GET /avatar/:id: Retrieves the avatar of a user by their Discord ID.
- GET /banner/:id: Retrieves the banner of a user by their Discord ID.
- GET /status: Returns the status of the API.
- Fetch user information including username, discriminator, avatar, banner, and activity.
- Retrieve user avatars and banners in high resolution.
- Get the current status of the API.
- Go 1.23.3 or higher
- A Discord bot token
- A server or local machine to run the API
-
Clone the repository:
git clone https://github.com/binary-blazer/distivity.git cd distivity
-
Update the configuration in
./config/variables.go
-
Rename the
.env.example
file to.env
and update the values:# On Unix cp .env.example .env # On Windows ren .env.example .env
The
.env
file should look like this with your values:PORT=8080 # Port DISCORD_BOT_TOKEN="" # Bot token DISCORD_GUILD_ID="" # Guild ID DISCORD_GUILD_INVITE="" # Guild invite
-
Install the dependencies:
go mod tidy
-
Run the API:
go run main.go
-
The API should now be running on
http://localhost:3000
.