mirror of
https://github.com/Myxelium/Lunaris2.0.git
synced 2026-07-07 21:45:07 +00:00
Add scheduler
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -14,6 +14,7 @@ public static class SlashCommandRegistration
|
||||
RegisterCommand(client, Command.Play.Name, Command.Play.Description, Command.Play.Options);
|
||||
RegisterCommand(client, Command.Resume.Name, Command.Resume.Description);
|
||||
RegisterCommand(client, Command.Clear.Name, Command.Clear.Description);
|
||||
RegisterCommand(client, Command.Scheduler.Name, Command.Scheduler.Description, Command.Scheduler.Options);
|
||||
}
|
||||
|
||||
private static void RegisterCommand(
|
||||
|
||||
Reference in New Issue
Block a user