Skip to content

Commit

Permalink
Uncomment code leftover from testing. Thanks to @angelobreuer for poi…
Browse files Browse the repository at this point in the history
…nting this out (DSharpPlus#1237)
  • Loading branch information
OoLunar authored Mar 13, 2022
1 parent dbf97af commit f4ee3e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions DSharpPlus/Clients/DiscordClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -556,10 +556,10 @@ public Task<DiscordGuild> CreateGuildFromTemplateAsync(string code, string name,
/// <exception cref="Exceptions.ServerErrorException">Thrown when Discord is unable to process the request.</exception>
public async Task<DiscordGuild> GetGuildAsync(ulong id, bool? withCounts = null)
{
//if (this._guilds.TryGetValue(id, out var guild) && (!withCounts.HasValue || !withCounts.Value))
// return guild;
if (this._guilds.TryGetValue(id, out var guild) && (!withCounts.HasValue || !withCounts.Value))
return guild;

DiscordGuild guild = await this.ApiClient.GetGuildAsync(id, withCounts).ConfigureAwait(false);
guild = await this.ApiClient.GetGuildAsync(id, withCounts).ConfigureAwait(false);
var channels = await this.ApiClient.GetGuildChannelsAsync(guild.Id).ConfigureAwait(false);
foreach (var channel in channels) guild._channels[channel.Id] = channel;

Expand Down

0 comments on commit f4ee3e7

Please sign in to comment.