mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-31 17:43:04 -06:00
remove task.run
This commit is contained in:
parent
825b1470e1
commit
ff9303d2b9
|
|
@ -50,7 +50,7 @@ public class DiscordClient(
|
||||||
// discord flags requests that don't look like a real browser
|
// discord flags requests that don't look like a real browser
|
||||||
if (tokenKind != TokenKind.Bot)
|
if (tokenKind != TokenKind.Bot)
|
||||||
{
|
{
|
||||||
await Task.Run(async () =>
|
try
|
||||||
{
|
{
|
||||||
// Cache headers from the external API so we don't make this request on every call.
|
// Cache headers from the external API so we don't make this request on every call.
|
||||||
|
|
||||||
|
|
@ -105,7 +105,8 @@ public class DiscordClient(
|
||||||
|
|
||||||
foreach (var kv in _cachedBrowserHeaders)
|
foreach (var kv in _cachedBrowserHeaders)
|
||||||
if (!request.Headers.Contains(kv.Key)) request.Headers.TryAddWithoutValidation(kv.Key, kv.Value);
|
if (!request.Headers.Contains(kv.Key)) request.Headers.TryAddWithoutValidation(kv.Key, kv.Value);
|
||||||
})
|
}
|
||||||
|
catch {}
|
||||||
}
|
}
|
||||||
|
|
||||||
var response = await Http.Client.SendAsync(
|
var response = await Http.Client.SendAsync(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue