A web service for generating petpet GIFs based on a Discord user's avatar, written in Go.
GET /discord/{user_id}.gif or /ds/{user_id}.gif
| Name | Type | Description |
|---|---|---|
{user_id} |
Snowflake | The Discord user's ID |
| Name | Default | Type | Description |
|---|---|---|---|
delay |
4 |
Unsigned Integer | GIF speed. Bigger is slower |
no-cache |
false |
Boolean | Whether to disable caching (Cache-Control headers) |
POST /custom or /c
Send a multipart/form-data request with a file field named image containing a PNG, JPEG or WebP.
The upload is limited to 5MB and a maximum of 1 MP (you can reconfigure it).
- Static binaries available as releases
- GHCR or
docker pull ghcr.io/wavy-cat/petpet-go(see Compose example)
Note
The Discord bot sends preview requests from the us-east1 GCP region (South Carolina, US). To reduce network latency, choose server locations close to it. If using a Cloudflare proxy, the nearest Cloudflare location is ATL (Atlanta, US).
Currently, config parameters can be specified either in the config.yml file or via environment variables.
Outbound HTTP proxy settings are handled by Go's standard environment variables: HTTP_PROXY, HTTPS_PROXY, and NO_PROXY.
Look at the configuration reference with comments (including environment variable names).
- Python: nakidai/petthecord
- Rust: mitsuki-kagamin/petpet-api
- C: nakidai/cptc