Restructure

This commit is contained in:
Myx
2024-04-13 20:04:51 +02:00
parent 3699a13cd9
commit f7b54ca80c
23 changed files with 186 additions and 11 deletions

View File

@@ -0,0 +1,24 @@
namespace Lunaris2.SlashCommand;
public static class Command
{
public static class Hello
{
public const string Name = "hello";
public const string Description = "Say hello to the bot!";
}
public static class Goodbye
{
public const string Name = "goodbye";
public const string Description = "Say goodbye to the bot!";
}
public static string[] GetAllCommands()
{
return typeof(Command)
.GetNestedTypes()
.Select(command => command.GetField("Name")?.GetValue(null)?.ToString())
.ToArray()!;
}
}