Basic bot

This commit is contained in:
Myx
2024-04-11 04:22:49 +02:00
commit 5b996ecd1d
13 changed files with 332 additions and 0 deletions

24
SlashCommand/Command.cs Normal file
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()!;
}
}