|
|
@@ -113,6 +113,66 @@ namespace Discord |
|
|
|
/// 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, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent component = null, ISticker[] stickers = null, Embed[] embeds = null); |
|
|
|
/// <summary> |
|
|
|
/// Sends a file to this message channel with an optional caption. |
|
|
|
/// </summary> |
|
|
|
/// <remarks> |
|
|
|
/// This method sends a file as if you are uploading an attachment directly from your Discord client. |
|
|
|
/// <note> |
|
|
|
/// If you wish to upload an image and have it embedded in a <see cref="Discord.EmbedType.Rich"/> embed, |
|
|
|
/// you may upload the file and refer to the file with "attachment://filename.ext" in the |
|
|
|
/// <see cref="Discord.EmbedBuilder.ImageUrl"/>. See the example section for its usage. |
|
|
|
/// </note> |
|
|
|
/// </remarks> |
|
|
|
/// <param name="attachment">The attachment containing the file and description.</param> |
|
|
|
/// <param name="text">The message to be sent.</param> |
|
|
|
/// <param name="isTTS">Whether the message should be read aloud by Discord or not.</param> |
|
|
|
/// <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> |
|
|
|
/// <param name="messageReference">The message references to be included. Used to reply to specific messages.</param> |
|
|
|
/// <param name="component">The message components to be included with this message. Used for interactions.</param> |
|
|
|
/// <param name="stickers">A collection of stickers to send with the file.</param> |
|
|
|
/// <param name="embeds">A array of <see cref="Embed"/>s to send with this response. Max 10.</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(FileAttachment attachment, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent component = null, ISticker[] stickers = null, Embed[] embeds = null); |
|
|
|
/// <summary> |
|
|
|
/// Sends a collection of files to this message channel. |
|
|
|
/// </summary> |
|
|
|
/// <remarks> |
|
|
|
/// This method sends files as if you are uploading attachments directly from your Discord client. |
|
|
|
/// <note> |
|
|
|
/// If you wish to upload an image and have it embedded in a <see cref="Discord.EmbedType.Rich"/> embed, |
|
|
|
/// you may upload the file and refer to the file with "attachment://filename.ext" in the |
|
|
|
/// <see cref="Discord.EmbedBuilder.ImageUrl"/>. See the example section for its usage. |
|
|
|
/// </note> |
|
|
|
/// </remarks> |
|
|
|
/// <param name="attachments">A collection of attachments to upload.</param> |
|
|
|
/// <param name="text">The message to be sent.</param> |
|
|
|
/// <param name="isTTS">Whether the message should be read aloud by Discord or not.</param> |
|
|
|
/// <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> |
|
|
|
/// <param name="messageReference">The message references to be included. Used to reply to specific messages.</param> |
|
|
|
/// <param name="component">The message components to be included with this message. Used for interactions.</param> |
|
|
|
/// <param name="stickers">A collection of stickers to send with the file.</param> |
|
|
|
/// <param name="embeds">A array of <see cref="Embed"/>s to send with this response. Max 10.</param> |
|
|
|
/// <returns> |
|
|
|
/// A task that represents an asynchronous send operation for delivering the message. The task result |
|
|
|
/// contains the sent message. |
|
|
|
/// </returns> |
|
|
|
Task<IUserMessage> SendFilesAsync(IEnumerable<FileAttachment> attachments, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent component = null, ISticker[] stickers = null, Embed[] embeds = null); |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// Gets a message from this message channel. |
|
|
|