(ifcbrk) feature: news channel publishing (#1530)

* Added PublishAsync to Messages.

* Added missing implementation.

* 1. Aligned with naming standards
2. Clarified xml docs
3. Properly threw exceptions instead of failing silently.

* Additional documentation included.

* Removed un-needed comments.

Co-authored-by: Matt Smith <v-matsm@microsoft.com>
This commit is contained in:
Matt Smith
2020-05-20 16:28:23 -05:00
committed by GitHub
parent 91b270a0ce
commit a6c1e4c23f
6 changed files with 66 additions and 3 deletions

View File

@@ -57,6 +57,21 @@ namespace Discord
/// </returns>
Task UnpinAsync(RequestOptions options = null);
/// <summary>
/// Publishes (crossposts) this message.
/// </summary>
/// <param name="options">The options to be used when sending the request.</param>
/// <returns>
/// A task that represents the asynchronous operation for publishing this message.
/// </returns>
/// <remarks>
/// <note type="warning">
/// This call will throw an <see cref="InvalidOperationException"/> if attempted in a non-news channel.
/// </note>
/// This method will publish (crosspost) the message. Please note, publishing (crossposting), is only available in news channels.
/// </remarks>
Task CrosspostAsync(RequestOptions options = null);
/// <summary>
/// Transforms this message's text into a human-readable form by resolving its tags.
/// </summary>