fix(discord): register slash command modules
PR Checks / test-and-build (pull_request) Successful in 8m27s
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user