mirror of
https://github.com/Myxelium/Lunaris2.0.git
synced 2026-04-11 15:19:53 +00:00
Restructure
This commit is contained in:
24
Bot/SlashCommand/Command.cs
Normal file
24
Bot/SlashCommand/Command.cs
Normal 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()!;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user