mirror of
https://github.com/Myxelium/Lunaris2.0.git
synced 2026-04-11 15:19:53 +00:00
Add Join and Play handlers, Expand Command Builder functionality
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Discord;
|
||||
using Discord.WebSocket;
|
||||
|
||||
namespace Lunaris2.SlashCommand;
|
||||
@@ -8,11 +9,13 @@ public static class SlashCommandRegistration
|
||||
{
|
||||
RegisterCommand(client, Command.Hello.Name, Command.Hello.Description);
|
||||
RegisterCommand(client, Command.Goodbye.Name, Command.Goodbye.Description);
|
||||
RegisterCommand(client, Command.Join.Name, Command.Join.Description);
|
||||
RegisterCommand(client, Command.Play.Name, Command.Play.Description, Command.Play.Options);
|
||||
}
|
||||
|
||||
private static void RegisterCommand(DiscordSocketClient client, string commandName, string commandDescription)
|
||||
private static void RegisterCommand(DiscordSocketClient client, string commandName, string commandDescription, List<SlashCommandOptionBuilder> commandOptions = null)
|
||||
{
|
||||
var command = new SlashCommandBuilder(commandName, commandDescription);
|
||||
var command = new SlashCommandBuilder(commandName, commandDescription, commandOptions);
|
||||
_ = command.CreateSlashCommand(client);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user