Skip to content

DiscordPluginOptions

Defined in: plugins/holocron-plugin-discord/src/index.ts:19

Options for the Discord plugin: how the webhook URL is resolved plus the notifications settings.

optional baseUrl?: string

Defined in: plugins/holocron-plugin-discord/src/index.ts:21

Override base URL for tests. Default: https://discord.com/api/v10

DiscordNotificationsOptions.baseUrl


optional cliToken?: string

Defined in: cli/kyber/dist/secrets.d.mts:125

The --token flag.

ResolveTokenInput.cliToken


optional defaultChannel?: string

Defined in: plugins/holocron-plugin-discord/src/capabilities/notifications.ts:257

Default webhook URL (or alias key) used when send() is called without an explicit channel, or with an empty string.

DiscordNotificationsOptions.defaultChannel


optional env?: ProcessEnv

Defined in: cli/kyber/dist/secrets.d.mts:127

The environment to read. Default process.env; a test passes its own.

ResolveTokenInput.env


optional fetch?: (input, init?) => Promise<Response>

Defined in: plugins/holocron-plugin-discord/src/index.ts:23

The fetch to use instead of the global one, for tests.

string | URL | Request

RequestInit

Promise<Response>


optional guildId?: string

Defined in: plugins/holocron-plugin-discord/src/capabilities/notifications.ts:259

Discord server (guild) id that setup notifications provisions. Not a secret.

DiscordNotificationsOptions.guildId


optional keyring?: (account) => string | null

Defined in: cli/kyber/dist/secrets.d.mts:129

Looks an account up in the keyring. Replaces the configured lookup and the credential store; a test passes its own.

string

string | null

ResolveTokenInput.keyring


optional layout?: NotificationsLayout

Defined in: plugins/holocron-plugin-discord/src/capabilities/notifications.ts:261

The server layout setup notifications applies.

DiscordNotificationsOptions.layout


optional org?: string

Defined in: cli/kyber/dist/secrets.d.mts:131

The active org. It selects the keyring account <service>.<org> first. Default: the variable orgEnvName names.

ResolveTokenInput.org


optional unsafeBotBaseUrl?: boolean

Defined in: plugins/holocron-plugin-discord/src/index.ts:29

Also send the BOT token to baseUrl. Off by default: baseUrl comes from a repo’s config, and a changed config must not be able to redirect the bot token to another host. Tests that stub the API set it.

DiscordNotificationsOptions.unsafeBotBaseUrl


optional webhooks?: Record<string, string>

Defined in: plugins/holocron-plugin-discord/src/capabilities/notifications.ts:252

Named aliases mapping a logical channel name to its webhook URL. Allows send("deploys", msg) instead of passing the full URL.

DiscordNotificationsOptions.webhooks