get method

Future<T> get(
  1. Snowflake id
)

Get an item by its id from the cache if it exists, else fetch it from the API.

Implementation

Future<T> get(Snowflake id) async => cache[id] ?? await fetch(id);