Hoping someone can help, It's been a few years since I used my cSharp hat. I'm attempting to setup a SlashBot in .Net Core 6. However, I'm attempting to break out the commands into their own namespace with 1 file per command for ease of management / function locating. I forget how to do this where it doesn't yell at me. Anyone have any help ?
private async Task SlashCommandHandler(SocketSlashCommand command)
{
switch (command.Data.Name)
{
case "config":
await DiscordBotConfig(command);
break;
}
}```
is in my Primary Worker Function in namespace ``Utilities.Discord`` namespace, then I have the namespace ``Utilities.Discord.SlashCommands`` that I want to have contain the slash commands.
```csharp
using Discord.Commands;
namespace RPGUtilities.Discord.SlashCommands
{
public class DiscordBotConfig
{
public async Task HandleAsync(SocketSlashCommand command)
{
await command.RespondAsync($"Attempting to just get this command working.");
}
}
}