예제 #1
0
        internal static RestConnection Create(BaseDiscordClient discord, Model model)
        {
            var entity = new RestConnection(discord);

            entity.Update(model);
            return(entity);
        }
예제 #2
0
        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());
        }