diff --git a/dev-docs/dotnet.md b/dev-docs/dotnet.md index c6293368..694bc1a8 100644 --- a/dev-docs/dotnet.md +++ b/dev-docs/dotnet.md @@ -14,18 +14,18 @@ The minimum configuration needed for the dotnet part of the bot to function incl | Name | Description | Rust Equivalent (if applicable) | | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------- | -| **`PluralKit__Api__ClientId`** | the ID of the bot's user account, used for calculating the bot's own permissions and for the link in `pk;invite`. | *`pluralkit__discord__client_id`* | +| **`PluralKit__Api__ClientId`** | the ID of the bot's user account, used for OAuth with Discord | *`pluralkit__discord__client_id`* | | **`PluralKit__Api__ClientSecret`** | the client secret of the application, used for OAuth with Discord | *`pluralkit__discord__client_secret`* | -| **`PluralKit__Api__TrustAuth`** | | | +| **`PluralKit__Api__TrustAuth`** | boolean used to determine if the API should trust upstream to provide it the system id of the authenticated user | | | **`PluralKit__Bot__AdminRole`** | Discord role ID used to determine if a user can use `pk;admin` commands | | | **`PluralKit__Bot__AvatarServiceUrl`** | the URL of the avatar service | | | **`PluralKit__Bot__ClientId`** | the ID of the bot's user account, used for calculating the bot's own permissions and for the link in `pk;invite`. | *`pluralkit__discord__client_id`* | | **`PluralKit__Bot__Cluster__TotalShards`** | the total number of shards | *`pluralkit__discord__cluster__total_shards`* | | **`PluralKit__Bot__DisableGateway`** | (deprecated) boolean used to enable or disable the inbuilt gateway functions, should be true if using Rust `gateway` | | | **`PluralKit__Bot__DiscordBaseUrl`** | the base Discord API url used for HTTP API requests | *`pluralkit__discord__api_base_url`* | -| **`PluralKit__Bot__EventAwaiterTarget`** | the target bind address used to receive events from `gateway` over http | | +| **`PluralKit__Bot__EventAwaiterTarget`** | the target bind address used to receive bot-instance specific events (such as interactive prompts/menus) from `gateway` over http -- value should generally be `source-addr`. | | | **`PluralKit__Bot__HttpCacheUrl`** | the URL of the http cache to use, as of now, the `gateway` service | | -| **`PluralKit__Bot__HttpListenerAddr`** | the base bind address | | +| **`PluralKit__Bot__HttpListenerAddr`** | the base bind address (use `allv4v6` instead of `::` if you want to also bind to `0.0.0.0`) | | | **`PluralKit__Bot__Token`** | the Discord bot token to connect with | *`pluralkit__discord__bot_token`* | | **`PluralKit__Database`** | the URI of the database to connect to (in [ADO.NET Npgsql format](https://www.connectionstrings.com/npgsql/)) | *`pluralkit__db__data_db_uri`* (diff formatting) | | **`PluralKit__MessagesDatabase`** | the URI of the database for message storage to connect to (in [ADO.NET Npgsql format](https://www.connectionstrings.com/npgsql/)) | *`pluralkit__db__messages_db_uri`* (diff formatting) | diff --git a/dev-docs/rust.md b/dev-docs/rust.md index 3df2c07c..dec9bd06 100644 --- a/dev-docs/rust.md +++ b/dev-docs/rust.md @@ -11,37 +11,38 @@ Configuration is done through environment variables. A potentially uncompleted a - AV - avatars - D - dispatch -| Used by: | Name | Description | -| --------------- | -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| G, ST | **`pluralkit__discord__bot_token`** | the Discord bot token to connect with | -| G, A | **`pluralkit__discord__client_id`** | the ID of the bot's user account, used for calculating the bot's own permissions and for the link in `pk;invite`. | -| A | **`pluralkit__discord__client_secret`** | the client secret of the application, used for OAuth with Discord | -| G | **`pluralkit__discord__cluster__total_shards`** | the total number of shards | -| G | **`pluralkit__discord__cluster__total_nodes`** | the total number of clusters | -| G | **`pluralkit__discord__cluster__node_id`** | the ID of the cluster -- overwritten in libpk on run for k8s configuration | -| G | **`pluralkit__discord__max_concurrency`** | number of identify requests per 5 seconds -- see Discord docs | -| G, ST | **`pluralkit__discord__api_base_url`** | the base Discord API url used for HTTP API requests | -| G, A, ST, AV | **`pluralkit__db__data_db_uri`** | the URI of the PostgreSQL data database in [libpq format](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING) | -| G, A, ST, AV | **`pluralkit__db__data_redis_addr`** | the address of the Redis instance, in [standard Redis format](https://redis.io/docs/latest/develop/clients/nodejs/connect/) | -| G, A, ST, AV | **`pluralkit__db__db_password`** | the password to use for PostgreSQL database connections | -| G, A, ST, AV | **`pluralkit__db__messages_db_uri`**
| the URI of the PostgreSQL messages database in [libpq format](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING) | -| G, A, ST, AV | **`pluralkit__db__stats_db_uri`** | the URI of the PostgreSQL statistics database in [libpq format](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING) | -| ST | **`pluralkit__scheduled_tasks__expected_gateway_count`** | the total number of expected running gateway instances | -| ST | **`pluralkit__scheduled_tasks__gateway_url`** | the base URL used for querying statistics from gateway instances | -| ST | **`pluralkit__scheduled_tasks__set_guild_count`** | boolean used to determine if the guild count should be updated in Redis for the bot status | -| A | **`pluralkit__api__addr`** | the bind address used for the Rust API | -| A | **`pluralkit__api__ratelimit_redis_addr`** | the address of a Redis instance to use for request ratelimiting | -| A | **`pluralkit__api__remote_url`** | the remote url of the dotnet API instance | -| A | **`pluralkit__api__temp_token2`** | the token used in the API for fetching app authorization | -| AV | **`pluralkit__avatars__cdn_url`** | the CDN address used for avatar storage | -| AV | **`pluralkit__avatars__cloudflare_token`** | the Cloudflare token to use for avatar cache cleanup | -| AV | **`pluralkit__avatars__cloudflare_zone_id`** | the Cloudflare zone id to use for avatar cache cleanup | -| AV | **`pluralkit__avatars__s3__application_id`** | the application id of the s3 instance to use for avatar storage | -| AV | **`pluralkit__avatars__s3__application_key`** | the application key of the s3 instance to use for avatar storage | -| AV | **`pluralkit__avatars__s3__bucket`** | the bucket to use for avatar storage | -| AV | **`pluralkit__avatars__s3__endpoint`** | the endpoint URL of the s3 instance to use for avatar storage | -| G, A, ST, AV, D | **`pluralkit__json_log`** | boolean used to enable or disable JSON log formatting | -| G | **`pluralkit__runtime_config_key`** | key used to determine runtime platform (used in prod, if dev/self-hosting, use 'gateway') | -| G, A, ST, AV, D | **`pluralkit__run_metrics_server`** | boolean used to enable or disable the inbuilt Prometheus format metrics server | -| G, A, ST, AV, D | **`pluralkit__sentry_url`** | the URL of a sentry instance to publish errors to | +| Used by: | Name | Description | +| --------------- | -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| G, ST | **`pluralkit__discord__bot_token`** | the Discord bot token to connect with | +| G, A | **`pluralkit__discord__client_id`** | the ID of the bot's user account, used for calculating the bot's own permissions and for the link in `pk;invite`. | +| A | **`pluralkit__discord__client_secret`** | the client secret of the application, used for OAuth with Discord | +| G | **`pluralkit__discord__cluster__total_shards`** | the total number of shards | +| G | **`pluralkit__discord__cluster__total_nodes`** | the total number of clusters | +| G | **`pluralkit__discord__cluster__node_id`** | the ID of the cluster (overwritten at runtime when operating under managers that can't template the node id into this variable, such as kubernetes) | +| G | **`pluralkit__discord__max_concurrency`** | number of identify requests per 5 seconds -- see Discord docs | +| G | **`pluralkit__discord__gateway_target`** | the URL of a dotnet bot instance to send events to | +| G, ST | **`pluralkit__discord__api_base_url`** | the base Discord API url used for HTTP API requests | +| G, A, ST, AV | **`pluralkit__db__data_db_uri`** | the URI of the PostgreSQL data database in [libpq format](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING) | +| G, A, ST, AV | **`pluralkit__db__data_redis_addr`** | the address of the Redis instance, in [standard Redis format](https://redis.io/docs/latest/develop/clients/nodejs/connect/) | +| G, A, ST, AV | **`pluralkit__db__db_password`** | the password to use for PostgreSQL database connections | +| G, A, ST, AV | **`pluralkit__db__messages_db_uri`** | the URI of the PostgreSQL messages database in [libpq format](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING) | +| G, A, ST, AV | **`pluralkit__db__stats_db_uri`** | the URI of the PostgreSQL statistics database in [libpq format](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING) | +| ST | **`pluralkit__scheduled_tasks__expected_gateway_count`** | the total number of expected running gateway instances | +| ST | **`pluralkit__scheduled_tasks__gateway_url`** | the base URL used for querying statistics from gateway instances | +| ST | **`pluralkit__scheduled_tasks__set_guild_count`** | boolean used to determine if the guild count should be updated in Redis for the bot status | +| A | **`pluralkit__api__addr`** | the bind address used for the Rust API | +| A | **`pluralkit__api__ratelimit_redis_addr`** | the address of a Redis instance to use for request ratelimiting | +| A | **`pluralkit__api__remote_url`** | the remote url of the dotnet API instance | +| A | **`pluralkit__api__temp_token2`** | the token used in the API for fetching app authorization | +| AV | **`pluralkit__avatars__cdn_url`** | the CDN address used for avatar storage | +| AV | **`pluralkit__avatars__cloudflare_token`** | the Cloudflare token to use for avatar cache cleanup | +| AV | **`pluralkit__avatars__cloudflare_zone_id`** | the Cloudflare zone id to use for avatar cache cleanup | +| AV | **`pluralkit__avatars__s3__application_id`** | the application id of the s3 instance to use for avatar storage | +| AV | **`pluralkit__avatars__s3__application_key`** | the application key of the s3 instance to use for avatar storage | +| AV | **`pluralkit__avatars__s3__bucket`** | the bucket to use for avatar storage | +| AV | **`pluralkit__avatars__s3__endpoint`** | the endpoint URL of the s3 instance to use for avatar storage | +| G, A, ST, AV, D | **`pluralkit__json_log`** | boolean used to enable or disable JSON log formatting | +| G | **`pluralkit__runtime_config_key`** | the instance identifier key used when fetching configuration from Redis at runtime to differentiate gateway instances (ex. 'gateway') | +| G, A, ST, AV, D | **`pluralkit__run_metrics_server`** | boolean used to enable or disable the inbuilt Prometheus format metrics server | +| G, A, ST, AV, D | **`pluralkit__sentry_url`** | the URL of a sentry instance to publish errors to |