05ca8061e9
PR Checks / test-and-build (pull_request) Successful in 5m46s
Add a separate GmRelay.DiscordBot worker using NetCord Gateway with startup token validation, PostgreSQL datasource registration, slash-command setup, component interaction service registration, and lifecycle logging. Wire the Discord service through Aspire AppHost, Docker Compose, PR checks, deploy image build/push/scan/pull steps, README docs, and synchronized version 2.2.0. Add TDD coverage for project isolation, token validation, startup wiring, runtime wiring, and version synchronization. Bump version -> 2.2.0
16 lines
373 B
C#
16 lines
373 B
C#
namespace GmRelay.DiscordBot;
|
|
|
|
public sealed class DiscordOptions
|
|
{
|
|
public string? Token { get; init; }
|
|
|
|
public void Validate()
|
|
{
|
|
if (string.IsNullOrWhiteSpace(Token))
|
|
{
|
|
throw new InvalidOperationException(
|
|
"Discord:Token is required. Set via environment variable Discord__Token or user secrets.");
|
|
}
|
|
}
|
|
}
|