Interface ShardCacheView

    • Method Detail

      • getElementById

        @Nullable
        JDA getElementById​(int id)
        Retrieves the JDA instance represented by the provided shard ID.
        Parameters:
        id - The ID of the entity
        Returns:
        Possibly-null entity for the specified shard ID
      • getElementById

        @Nullable
        default JDA getElementById​(@Nonnull
                                   java.lang.String id)
        Retrieves the JDA instance represented by the provided shard ID or null if none of the connected shards match the provided id.
        Parameters:
        id - The ID of the shard
        Returns:
        Possibly-null entity for the specified shard ID
        Throws:
        java.lang.NumberFormatException - If the provided String is null or cannot be resolved to an unsigned int id