Class NsfwChannelJavacordSlash
- java.lang.Object
-
- net.kautler.command.api.restriction.javacord.slash.NsfwChannelJavacordSlash
-
- All Implemented Interfaces:
Restriction<SlashCommandInteraction>
@ApplicationScoped public class NsfwChannelJavacordSlash extends Object implements Restriction<SlashCommandInteraction>
A restriction that allows a command for NSFW channels and is evaluated by the Javacord slash command handler. If a message is not sent on a server, this restriction always denies.
-
-
Constructor Summary
Constructors Constructor Description NsfwChannelJavacordSlash()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allowCommand(CommandContext<? extends SlashCommandInteraction> commandContext)
Returns whether a command caused by the given command context should be allowed by this restriction or not.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.kautler.command.api.restriction.Restriction
getRealClass
-
-
-
-
Method Detail
-
allowCommand
public boolean allowCommand(CommandContext<? extends SlashCommandInteraction> commandContext)
Description copied from interface:Restriction
Returns whether a command caused by the given command context should be allowed by this restriction or not.- Specified by:
allowCommand
in interfaceRestriction<SlashCommandInteraction>
- Parameters:
commandContext
- the command context, usually fully populated- Returns:
- whether a command caused by the given command context should be allowed by this restriction or not
-
-