Class BaseCommandRequirements
java.lang.Object
xyz.dynxsty.dih4jda.interactions.commands.CommandRequirements
xyz.dynxsty.dih4jda.interactions.commands.BaseCommandRequirements
- Direct Known Subclasses:
ContextCommand,SlashCommand
Represents a single, executable command.
- Since:
- v1.5
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidblacklistGuilds(Long... blacklisted) Prevents the given set ofGuilds from updating their Slash Commands.final Set<net.dv8tion.jda.api.entities.Guild>getGuilds(net.dv8tion.jda.api.JDA jda) Gets all Guilds whose Slash Commands should be updated.final RegistrationTypefinal voidfinal voidwhitelistGuilds(Long... whitelisted) Allows a set ofGuilds to update their Slash Commands.Methods inherited from class xyz.dynxsty.dih4jda.interactions.commands.CommandRequirements
getRequiredPermissions, getRequiredRoles, getRequiredUsers, requirePermissions, requireRoles, requireUsers
-
Constructor Details
-
BaseCommandRequirements
public BaseCommandRequirements()
-
-
Method Details
-
whitelistGuilds
Allows a set ofGuilds to update their Slash Commands.- Parameters:
whitelisted- An array ofLongs.
-
blacklistGuilds
Prevents the given set ofGuilds from updating their Slash Commands.- Parameters:
blacklisted- An array ofLongs.
-
getGuilds
Gets all Guilds whose Slash Commands should be updated.- Parameters:
jda- TheJDAinstance.- Returns:
- A
Listwith all Guilds.
-
getRegistrationType
-
setRegistrationType
- Parameters:
type- How the command should be queued.
-