fix(discord): register slash command modules
PR Checks / test-and-build (pull_request) Successful in 8m27s

Register NetCord application command modules after the host is built so module-based commands are published alongside the minimal /ping command.

Update README Discord env guidance to avoid the unused DISCORD_BOT_CLIENT_ID variable.

Bump version to 3.0.2.
This commit is contained in:
2026-05-25 15:49:36 +03:00
parent 8214e052af
commit eff0128d29
8 changed files with 31 additions and 16 deletions
+2
View File
@@ -18,6 +18,7 @@ using Microsoft.Extensions.DependencyInjection;
using NetCord;
using NetCord.Gateway;
using NetCord.Hosting.Gateway;
using NetCord.Hosting.Services;
using NetCord.Hosting.Services.ApplicationCommands;
using NetCord.Hosting.Services.ComponentInteractions;
using NetCord.Services.ComponentInteractions;
@@ -89,5 +90,6 @@ builder.Services
var host = builder.Build();
host.AddSlashCommand("ping", "Checks whether GM-Relay Discord is online.", () => "Pong!");
host.AddModules(typeof(Program).Assembly);
await host.RunAsync();
@@ -73,7 +73,7 @@
</button>
</form>
<div class="nav-version">v3.0.1</div>
<div class="nav-version">v3.0.2</div>
</div>
</Authorized>
<NotAuthorized>