(ifcbrk) fix: Add AllowedMentions to SendFileAsync (#1531)
* Add AllowedMentions to SendFileAsync * Update xml reference and mocked channels
This commit is contained in:
@@ -59,11 +59,15 @@ namespace Discord
|
||||
/// <param name="embed">The <see cref="Discord.EmbedType.Rich" /> <see cref="Embed" /> to be sent.</param>
|
||||
/// <param name="options">The options to be used when sending the request.</param>
|
||||
/// <param name="isSpoiler">Whether the message attachment should be hidden as a spoiler.</param>
|
||||
/// <param name="allowedMentions">
|
||||
/// Specifies if notifications are sent for mentioned users and roles in the message <paramref name="text"/>.
|
||||
/// If <c>null</c>, all mentioned roles and users will be notified.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// A task that represents an asynchronous send operation for delivering the message. The task result
|
||||
/// contains the sent message.
|
||||
/// </returns>
|
||||
Task<IUserMessage> SendFileAsync(string filePath, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false);
|
||||
Task<IUserMessage> SendFileAsync(string filePath, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null);
|
||||
/// <summary>
|
||||
/// Sends a file to this message channel with an optional caption.
|
||||
/// </summary>
|
||||
@@ -88,11 +92,15 @@ namespace Discord
|
||||
/// <param name="embed">The <see cref="Discord.EmbedType.Rich"/> <see cref="Embed"/> to be sent.</param>
|
||||
/// <param name="options">The options to be used when sending the request.</param>
|
||||
/// <param name="isSpoiler">Whether the message attachment should be hidden as a spoiler.</param>
|
||||
/// <param name="allowedMentions">
|
||||
/// Specifies if notifications are sent for mentioned users and roles in the message <paramref name="text"/>.
|
||||
/// If <c>null</c>, all mentioned roles and users will be notified.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// A task that represents an asynchronous send operation for delivering the message. The task result
|
||||
/// contains the sent message.
|
||||
/// </returns>
|
||||
Task<IUserMessage> SendFileAsync(Stream stream, string filename, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false);
|
||||
Task<IUserMessage> SendFileAsync(Stream stream, string filename, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a message from this message channel.
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace Discord
|
||||
/// </summary>
|
||||
/// <example>
|
||||
/// <para>The following example checks if the current user has the ability to send a message with attachment in
|
||||
/// this channel; if so, uploads a file via <see cref="IMessageChannel.SendFileAsync(string, string, bool, Embed, RequestOptions, bool)"/>.</para>
|
||||
/// this channel; if so, uploads a file via <see cref="IMessageChannel.SendFileAsync(string, string, bool, Embed, RequestOptions, bool, AllowedMentions)"/>.</para>
|
||||
/// <code language="cs">
|
||||
/// if (currentUser?.GetPermissions(targetChannel)?.AttachFiles)
|
||||
/// await targetChannel.SendFileAsync("fortnite.png");
|
||||
|
||||
Reference in New Issue
Block a user