Browse Source

Style consistency. Remove extraneous overloads.

Remove extraneous overloads.
pull/773/head
AntiTcb 8 years ago
parent
commit
806eac8e06
2 changed files with 5 additions and 21 deletions
  1. +4
    -12
      src/Discord.Net.WebSocket/DiscordShardedClient.cs
  2. +1
    -9
      src/Discord.Net.WebSocket/DiscordSocketClient.cs

+ 4
- 12
src/Discord.Net.WebSocket/DiscordShardedClient.cs View File

@@ -117,8 +117,8 @@ namespace Discord.WebSocket
public override async Task StartAsync()
=> await Task.WhenAll(_shards.Select(x => x.StartAsync())).ConfigureAwait(false);
/// <inheritdoc />
public override async Task StopAsync() =>
await Task.WhenAll(_shards.Select(x => x.StopAsync())).ConfigureAwait(false);
public override async Task StopAsync()
=> await Task.WhenAll(_shards.Select(x => x.StopAsync())).ConfigureAwait(false);

public DiscordSocketClient GetShard(int id)
{
@@ -168,11 +168,7 @@ namespace Discord.WebSocket
for (int i = 0; i < _shards.Length; i++)
result += _shards[i].PrivateChannels.Count;
return result;
}

/// <inheritdoc />
public Task<IReadOnlyCollection<RestConnection>> GetConnectionsAsync()
=> ClientHelper.GetConnectionsAsync(this, new RequestOptions());
}

private IEnumerable<SocketGuild> GetGuilds()
{
@@ -188,11 +184,7 @@ namespace Discord.WebSocket
for (int i = 0; i < _shards.Length; i++)
result += _shards[i].Guilds.Count;
return result;
}

/// <inheritdoc />
public Task<RestInvite> GetInviteAsync(string inviteId)
=> ClientHelper.GetInviteAsync(this, inviteId, new RequestOptions());
}

/// <inheritdoc />
public override SocketUser GetUser(ulong id)


+ 1
- 9
src/Discord.Net.WebSocket/DiscordSocketClient.cs View File

@@ -240,15 +240,7 @@ namespace Discord.WebSocket
/// <inheritdoc />
public override SocketChannel GetChannel(ulong id)
=> State.GetChannel(id);

/// <inheritdoc />
public Task<IReadOnlyCollection<RestConnection>> GetConnectionsAsync()
=> ClientHelper.GetConnectionsAsync(this, new RequestOptions());

/// <inheritdoc />
public Task<RestInvite> GetInviteAsync(string inviteId)
=> ClientHelper.GetInviteAsync(this, inviteId, new RequestOptions());

/// <inheritdoc />
public override SocketUser GetUser(ulong id)
=> State.GetUser(id);


Loading…
Cancel
Save