[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:
@@ -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" : "")})";
|
||||
|
||||
Reference in New Issue
Block a user