mirror of
https://github.com/Myxelium/Lunaris2.0.git
synced 2026-04-11 15:19:53 +00:00
Basic bot
This commit is contained in:
18
SlashCommand/SlashCommandRegistration.cs
Normal file
18
SlashCommand/SlashCommandRegistration.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Discord.WebSocket;
|
||||
|
||||
namespace Lunaris2.SlashCommand;
|
||||
|
||||
public static class SlashCommandRegistration
|
||||
{
|
||||
public static void RegisterCommands(this DiscordSocketClient client)
|
||||
{
|
||||
RegisterCommand(client, Command.Hello.Name, Command.Hello.Description);
|
||||
RegisterCommand(client, Command.Goodbye.Name, Command.Goodbye.Description);
|
||||
}
|
||||
|
||||
private static void RegisterCommand(DiscordSocketClient client, string commandName, string commandDescription)
|
||||
{
|
||||
var command = new SlashCommandBuilder(commandName, commandDescription);
|
||||
_ = command.CreateSlashCommand(client);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user