Discord API bindings: messages (with file uploads), channels and threads, guilds, members, roles, bans, emoji, stickers, scheduled events, auto-moderation, webhooks, application commands, and interactions (Ed25519 request verification plus responses).
Setup: set discord.bot.token in context to the bot token from
the Developer Portal's Bot tab. For an interactions endpoint, also
set discord.public.key to the application's public key.
Every API-calling function also takes a trailing opts Map for a
per-call bot token; see ::discord::api.
Quick start
::messages ::discord::messages
::messages/create-message(::messages/CreateMessageRequest({
channel_id: "1100000000000000000",
content: "Deploy finished"
}))
Values
BASE_URL
BASE_URL: Str "https://discord.com/api/v10"
USER_AGENT
USER_AGENT: Str "DiscordBot (https://hot.dev/pkg/hot.dev/discord, 1.1.3)"