A web service for generating petpet GIFs based on a Discord user's avatar, written in Go.
GET /discord/{user_id} or /ds/{user_id}
By default, the response is a WebP. Prepend .gif or .webp to the {user_id} path segment to force a specific format, e.g. /discord/{user_id}.gif.
| Name | Type | Description |
|---|---|---|
{user_id} |
Snowflake | The Discord user's ID |
| Name | Default | Type | Description |
|---|---|---|---|
delay |
4 |
Unsigned Integer | Animation speed. Bigger is slower |
no-cache |
false |
Boolean | Whether to disable caching (Cache-Control headers) |
POST /custom or /c (WebP)
POST /custom/gif or /c/gif (GIF)
POST /custom/webp or /c/webp (WebP)
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).
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