[Refactor] Remove some unnecessary async/await (#2739)

* Remove some unnecessary async/await

* More not-so-async stuff

* More not-so-async stuff

* Fix merge issue
This commit is contained in:
Dmitry
2023-11-19 00:29:14 +03:00
committed by GitHub
parent 699554ad11
commit 86655a8157
73 changed files with 1020 additions and 1020 deletions

View File

@@ -228,14 +228,14 @@ namespace Discord.WebSocket
/// <inheritdoc />
/// <exception cref="InvalidOperationException">This operation may only be called on a <see cref="INewsChannel"/> channel.</exception>
public async Task CrosspostAsync(RequestOptions options = null)
public Task CrosspostAsync(RequestOptions options = null)
{
if (!(Channel is INewsChannel))
{
throw new InvalidOperationException("Publishing (crossposting) is only valid in news channels.");
}
await MessageHelper.CrosspostAsync(this, Discord, options);
return MessageHelper.CrosspostAsync(this, Discord, options);
}
private string DebuggerDisplay => $"{Author}: {Content} ({Id}{(Attachments.Count > 0 ? $", {Attachments.Count} Attachments" : "")})";