internal static RestConnection Create(BaseDiscordClient discord, Model model) { var entity = new RestConnection(discord); entity.Update(model); return(entity); }
public static async Task <IReadOnlyCollection <RestConnection> > GetConnectionsAsync(BaseDiscordClient client, RequestOptions options) { var models = await client.ApiClient.GetMyConnectionsAsync(options).ConfigureAwait(false); return(models.Select(model => RestConnection.Create(client, model)).ToImmutableArray()); }