Class SlashCommandDataFactory

java.lang.Object
xyz.norbjert.jda4spring.internal.SlashCommandDataFactory

public class SlashCommandDataFactory extends Object
static helper class, constructs a SlashCommandData object from an annotated method, converting the annotation into whatever JDA wants
  • Method Details

    • createSlashCommand

      public static net.dv8tion.jda.api.interactions.commands.build.SlashCommandData createSlashCommand(Method slashMethod)
      creates a new
      Parameters:
      slashMethod - a method with the @SlashCommand annotation
      Returns:
      the SlashCommandData, extracted from the annotation and, if f.e. no command="xyz" has been set, method name