Skip to content

Commit

Permalink
Add new configuration document for connection discord (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
omerosaienni authored Sep 9, 2024
1 parent 8468d7a commit 9730037
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions docs/reference/config-files/connection/discord.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: discord
sidebar_label: discord
---

# discord

The `discord` connection can be used to access Discord resources.

```hcl
connection "discord" "my_discord" {
token = "00B630jSCGU4Fake5Yh4KQMFakezwE2OgVcS7N999b"
}
```

## Arguments

| Name | Type | Required? | Description |
| ------- | ------ | --------- | ----------- |
| `token` | String | Optional | API token |

All arguments are optional, and a `discord` connection with no arguments will behave the same as the [default connection](#default-connection).

## Attributes (Read-Only)

| Attribute | Type | Description |
| --------- | ---- | -------------------------------------------------------------------------------- |
| `env` | Map | A map of the resolved connection-related environment variables (`DISCORD_TOKEN`) |

## Default Connection

The `discord` connection type includes an implicit, default connection (`connection.discord.default`) that will be configured to set the `token` to the `DISCORD_TOKEN` environment variable.

```hcl
connection "discord" "default" {
token = env("DISCORD_TOKEN")
}
```

0 comments on commit 9730037

Please sign in to comment.