Class ServerOwnerJavacord

  • All Implemented Interfaces:
    Restriction<Message>

    @ApplicationScoped
    public class ServerOwnerJavacord
    extends Object
    implements Restriction<Message>
    A restriction that allows a command for the server owner and is evaluated by the Javacord command handler. If a message is not sent on a server, this restriction always denies.
    • Constructor Detail

      • ServerOwnerJavacord

        public ServerOwnerJavacord()
    • Method Detail

      • allowCommand

        public boolean allowCommand​(CommandContext<? extends Message> 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 interface Restriction<Message>
        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