Class SKUConfiguration

java.lang.Object
de.chojo.jdautil.interactions.premium.SKUConfiguration

public class SKUConfiguration extends Object
  • Constructor Details

    • SKUConfiguration

      public SKUConfiguration()
  • Method Details

    • isEntitled

      public boolean isEntitled(SlashCommandInteractionEvent interaction)
    • isEntitled

      public boolean isEntitled(CommandAutoCompleteInteractionEvent interaction)
    • isEntitled

      public boolean isEntitled(MessageContextInteractionEvent interaction)
    • isEntitled

      public boolean isEntitled(UserContextInteractionEvent interaction)
    • isCommandEntitled

      public boolean isCommandEntitled(CommandInteractionPayload interaction, String fullCommandName)
      Checks the entitlement of a slash command or its autocompletion under a given full command name. Used when the command was invoked under an alias, since the payload only knows the alias.
      Parameters:
      interaction - interaction payload
      fullCommandName - full command name with the name of the command instead of the alias
      Returns:
      true if the user is entitled to use the command
    • commandSkus

      public SkuMeta commandSkus(String fullCommandName)
      The SKUs required for a slash command.
      Parameters:
      fullCommandName - full command name
      Returns:
      required SKUs, empty when the command is not restricted
    • messageSkus

      public SkuMeta messageSkus(String name)
      The SKUs required for a message command.
      Parameters:
      name - command name
      Returns:
      required SKUs, empty when the command is not restricted
    • userSkus

      public SkuMeta userSkus(String name)
      The SKUs required for a user command.
      Parameters:
      name - command name
      Returns:
      required SKUs, empty when the command is not restricted
    • commands

      public Set<Long> commands(String name)
    • messages

      public Set<Long> messages(String name)
    • users

      public Set<Long> users(String name)