BirthdayBot/ApplicationCommands/HelpInfoCommands.cs
Noi f8b3f429bb Begin implementing slash commands
Set up a structure not unlike what exists for text commands in order to neatly separate subsets of commands/features into their own files.

Changed references for existing commands to "text commands" where it made sense to do so.
2022-01-30 22:26:33 -08:00

32 lines
1 KiB
C#

using BirthdayBot.Data;
namespace BirthdayBot.ApplicationCommands;
internal class HelpInfoCommands : BotApplicationCommand {
private static readonly ApplicationCommandProperties[] _commands;
static HelpInfoCommands() {
_commands = new ApplicationCommandProperties[] {
new SlashCommandBuilder()
.WithName("help").WithDescription("attempts to get help").Build(),
new SlashCommandBuilder()
.WithName("not-help").WithDescription("you're not getting help here").Build()
};
}
public override IEnumerable<ApplicationCommandProperties> GetCommands() {
return _commands;
}
public override CommandResponder? GetHandlerFor(string commandName) {
switch (commandName) {
case "help":
return CmdHelp;
default:
return null;
}
}
private async Task CmdHelp(ShardInstance instance, GuildConfiguration gconf, SocketSlashCommand arg) {
await arg.RespondAsync("i am help. is this help?");
}
}