mirror of
https://github.com/NoiTheCat/BirthdayBot.git
synced 2024-11-21 21:54:36 +00:00
Noi
f8b3f429bb
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.
32 lines
1 KiB
C#
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?");
|
|
}
|
|
}
|