Class InsufficientPermissionException

    • Constructor Detail

      • InsufficientPermissionException

        public InsufficientPermissionException​(@Nonnull
                                               Guild guild,
                                               @Nonnull
                                               Permission permission)
      • InsufficientPermissionException

        public InsufficientPermissionException​(@Nonnull
                                               Guild guild,
                                               @Nonnull
                                               Permission permission,
                                               @Nonnull
                                               java.lang.String reason)
      • InsufficientPermissionException

        public InsufficientPermissionException​(@Nonnull
                                               GuildChannel channel,
                                               @Nonnull
                                               Permission permission)
      • InsufficientPermissionException

        public InsufficientPermissionException​(@Nonnull
                                               GuildChannel channel,
                                               @Nonnull
                                               Permission permission,
                                               @Nonnull
                                               java.lang.String reason)
    • Method Detail

      • getGuildId

        public long getGuildId()
        The id for the responsible Guild instance.
        Returns:
        The ID as a long
        Since:
        4.0.0
        See Also:
        JDA.getGuildById(long)
      • getGuild

        @Nullable
        public Guild getGuild​(@Nonnull
                              JDA api)
        The Guild instance for the guild id.
        Parameters:
        api - The shard to perform the lookup in
        Returns:
        The Guild instance or null
        Throws:
        java.lang.IllegalArgumentException - If the provided JDA instance is null
        Since:
        4.0.0
      • getChannel

        @Nullable
        public GuildChannel getChannel​(@Nonnull
                                       JDA api)
        The GuildChannel instance for the channel id.
        Parameters:
        api - The shard to perform the lookup in
        Returns:
        The GuildChannel instance or null
        Throws:
        java.lang.IllegalArgumentException - If the provided JDA instance is null
        Since:
        4.0.0