Add scheduler

This commit is contained in:
Myx
2025-02-17 03:54:18 +01:00
parent 5726c110a1
commit ae1a4e14d6
22 changed files with 535 additions and 220 deletions

View File

@@ -5,6 +5,9 @@ namespace Lunaris2.SlashCommand;
public static class Option
{
public const string Input = "input";
public const string Time = "time";
public const string IsRecurring = "repeating";
public const string Message = "message";
}
public static class Command
@@ -56,6 +59,38 @@ public static class Command
};
}
public static class Scheduler
{
public const string Name = "scheduler";
public const string Description = "Schedule a message";
public static readonly List<SlashCommandOptionBuilder>? Options =
[
new SlashCommandOptionBuilder
{
Name = "message",
Description = "The message you want to schedule",
Type = ApplicationCommandOptionType.String,
IsRequired = true
},
new SlashCommandOptionBuilder
{
Name = "time",
Description = "The time you want to schedule the message",
Type = ApplicationCommandOptionType.String,
IsRequired = true
},
new SlashCommandOptionBuilder
{
Name = "repeating",
Description = "Whether the message should repeat",
Type = ApplicationCommandOptionType.Boolean,
IsRequired = false,
IsDefault = false
}
];
}
public static string[] GetAllCommands()
{
return typeof(Command)