tadpole/user_agent
The User-Agent Discord requires on HTTP API requests, in the shape
DiscordBot ($url, $versionNumber) from their reference docs.
Requests without a valid one may be blocked by Cloudflare before
they ever reach the API. Both the REST transport and the gateway
websocket handshake send it, so Discord can tell a tadpole bot
from anything else in their logs.
version is bumped by hand alongside gleam.toml as part of the
release checklist (CONTRIBUTING.md, release flow).
Stability: Stable.
Values
pub fn header() -> #(String, String)
The ready-made request header pair: (“user-agent”, value).
pub fn value() -> String
The full User-Agent value in Discord’s required
DiscordBot ($url, $versionNumber) shape.