(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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user