Class ServerManagerJda

  • All Implemented Interfaces:
    Restriction<Message>

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

      • allowCommand

        public boolean allowCommand​(Message message)
        Description copied from interface: Restriction
        Returns whether a command caused by the given message should be allowed by this restriction or not.
        Specified by:
        allowCommand in interface Restriction<Message>
        Parameters:
        message - the message that caused the command to check allowance for
        Returns:
        whether a command caused by the given message should be allowed by this restriction or not