https://github.com/binary-blazer/distivity
A modern RESTful API to get presence details of a discord account by ID
https://github.com/binary-blazer/distivity
api discord docker go golang presence rest
Last synced: 5 months ago
JSON representation
A modern RESTful API to get presence details of a discord account by ID
- Host: GitHub
- URL: https://github.com/binary-blazer/distivity
- Owner: binary-blazer
- License: gpl-3.0
- Created: 2025-02-13T19:28:49.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-02-16T22:18:13.000Z (8 months ago)
- Last Synced: 2025-02-16T23:22:00.514Z (8 months ago)
- Topics: api, discord, docker, go, golang, presence, rest
- Language: Go
- Homepage:
- Size: 82 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# Distivity
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.
## API Capabilities
### Endpoints
- **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.### Features
- 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.## Self-Hosting Requirements and Setup Instructions
### Requirements
- Go 1.23.3 or higher
- A Discord bot token
- A server or local machine to run the API### Setup Instructions
1. Clone the repository:
```sh
git clone https://github.com/binary-blazer/distivity.git
cd distivity
```2. Update the configuration in `./config/variables.go`
3. Rename the `.env.example` file to `.env` and update the values:
```sh
# On Unix
cp .env.example .env# On Windows
ren .env.example .env
```
The `.env` file should look like this with your values:
```env
PORT=8080 # Port
DISCORD_BOT_TOKEN="" # Bot token
DISCORD_GUILD_ID="" # Guild ID
DISCORD_GUILD_INVITE="" # Guild invite
```4. Install the dependencies:
```sh
go mod tidy
```5. Run the API:
```sh
go run main.go
```6. The API should now be running on `http://localhost:3000`.