Class BaseCommandRequirements

java.lang.Object
xyz.dynxsty.dih4jda.interactions.commands.CommandRequirements
xyz.dynxsty.dih4jda.interactions.commands.BaseCommandRequirements
Direct Known Subclasses:
ContextCommand, SlashCommand

public abstract class BaseCommandRequirements extends CommandRequirements
Represents a single, executable command.
Since:
v1.5
See Also:
  • Constructor Details

    • BaseCommandRequirements

      public BaseCommandRequirements()
  • Method Details

    • whitelistGuilds

      public final void whitelistGuilds(Long... whitelisted)
      Allows a set of Guilds to update their Slash Commands.
      Parameters:
      whitelisted - An array of Longs.
    • blacklistGuilds

      public final void blacklistGuilds(Long... blacklisted)
      Prevents the given set of Guilds from updating their Slash Commands.
      Parameters:
      blacklisted - An array of Longs.
    • getGuilds

      public final Set<net.dv8tion.jda.api.entities.Guild> getGuilds(net.dv8tion.jda.api.JDA jda)
      Gets all Guilds whose Slash Commands should be updated.
      Parameters:
      jda - The JDA instance.
      Returns:
      A List with all Guilds.
    • getRegistrationType

      public final RegistrationType getRegistrationType()
    • setRegistrationType

      public final void setRegistrationType(RegistrationType type)
      Parameters:
      type - How the command should be queued.