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 const repo_url: String

The repository URL Discord sees in the User-Agent.

pub fn value() -> String

The full User-Agent value in Discord’s required DiscordBot ($url, $versionNumber) shape.

pub const version: String

The tadpole version reported in the User-Agent. Keep in step with gleam.toml at release time.

Search Document