mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-26 10:18:48 +00:00
Call .ConfigureAwait(false)
Yes I wrote true, this was a mistake. https://media.tenor.com/YQv2NMgnGmoAAAAC/tom-hanks-forrest-gump.gif
This commit is contained in:
parent
da5c350117
commit
c8d2a5cbec
@ -75,6 +75,6 @@ public static class DiscordChannelExtensions
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return await client.GetChannelAsync(channel.Id).ConfigureAwait(true);
|
return await client.GetChannelAsync(channel.Id).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ public static class DiscordGuildExtensions
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
await Task.WhenAll(guild.Threads.Values.Select(t => t.JoinThreadAsync())).ConfigureAwait(true);
|
await Task.WhenAll(guild.Threads.Values.Select(t => t.JoinThreadAsync())).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -58,6 +58,6 @@ public static class DiscordGuildExtensions
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return await client.GetGuildAsync(guild.Id).ConfigureAwait(true);
|
return await client.GetGuildAsync(guild.Id).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ public static class DiscordMemberExtensions
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DiscordGuild guild = await member.Guild.NormalizeClientAsync(client).ConfigureAwait(true);
|
DiscordGuild guild = await member.Guild.NormalizeClientAsync(client).ConfigureAwait(false);
|
||||||
return await guild.GetMemberAsync(member.Id).ConfigureAwait(true);
|
return await guild.GetMemberAsync(member.Id).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,8 +26,8 @@ public static class DiscordMessageExtensions
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
await Task.Delay(delay).ConfigureAwait(true);
|
await Task.Delay(delay).ConfigureAwait(false);
|
||||||
await message.DeleteAsync(reason).ConfigureAwait(true);
|
await message.DeleteAsync(reason).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -48,8 +48,8 @@ public static class DiscordMessageExtensions
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DiscordMessage message = await task.ConfigureAwait(true);
|
DiscordMessage message = await task.ConfigureAwait(false);
|
||||||
await message.DeleteAfterAsync(delay, reason).ConfigureAwait(true);
|
await message.DeleteAfterAsync(delay, reason).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -83,7 +83,7 @@ public static class DiscordMessageExtensions
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DiscordChannel channel = await message.Channel.NormalizeClientAsync(client).ConfigureAwait(true);
|
DiscordChannel channel = await message.Channel.NormalizeClientAsync(client).ConfigureAwait(false);
|
||||||
return await channel.GetMessageAsync(message.Id).ConfigureAwait(true);
|
return await channel.GetMessageAsync(message.Id).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ public static class DiscordUserExtensions
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return await guild.GetMemberAsync(user.Id).ConfigureAwait(true);
|
return await guild.GetMemberAsync(user.Id).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch (NotFoundException)
|
catch (NotFoundException)
|
||||||
{
|
{
|
||||||
@ -113,7 +113,7 @@ public static class DiscordUserExtensions
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
DiscordMember? member = await guild.GetMemberAsync(user.Id).ConfigureAwait(true);
|
DiscordMember? member = await guild.GetMemberAsync(user.Id).ConfigureAwait(false);
|
||||||
return member is not null;
|
return member is not null;
|
||||||
}
|
}
|
||||||
catch (NotFoundException)
|
catch (NotFoundException)
|
||||||
@ -153,6 +153,6 @@ public static class DiscordUserExtensions
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return await client.GetUserAsync(user.Id).ConfigureAwait(true);
|
return await client.GetUserAsync(user.Id).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ public static class CollectionExtensions
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
await item.DisposeAsync().ConfigureAwait(true);
|
await item.DisposeAsync().ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
source.Clear();
|
source.Clear();
|
||||||
|
@ -226,7 +226,7 @@ public static class EnumerableExtensions
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
await item.DisposeAsync().ConfigureAwait(true);
|
await item.DisposeAsync().ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user