diff --git a/src/Discord.Net.Core/Entities/Channels/IMessageChannel.cs b/src/Discord.Net.Core/Entities/Channels/IMessageChannel.cs
index 00ec38746..60a7c7575 100644
--- a/src/Discord.Net.Core/Entities/Channels/IMessageChannel.cs
+++ b/src/Discord.Net.Core/Entities/Channels/IMessageChannel.cs
@@ -31,11 +31,12 @@ namespace Discord
/// The message components to be included with this message. Used for interactions.
/// A collection of stickers to send with the message.
/// A array of s to send with this response. Max 10.
+ /// A message flag to be applied to the sent message, only is permitted.
///
/// A task that represents an asynchronous send operation for delivering the message. The task result
/// contains the sent message.
///
- Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null);
+ Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None);
///
/// Sends a file to this message channel with an optional caption.
///
@@ -71,11 +72,12 @@ namespace Discord
/// The message components to be included with this message. Used for interactions.
/// A collection of stickers to send with the file.
/// A array of s to send with this response. Max 10.
+ /// A message flag to be applied to the sent message, only is permitted.
///
/// A task that represents an asynchronous send operation for delivering the message. The task result
/// contains the sent message.
///
- Task SendFileAsync(string filePath, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null);
+ Task SendFileAsync(string filePath, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None);
///
/// Sends a file to this message channel with an optional caption.
///
@@ -108,11 +110,12 @@ namespace Discord
/// The message components to be included with this message. Used for interactions.
/// A collection of stickers to send with the file.
/// A array of s to send with this response. Max 10.
+ /// A message flag to be applied to the sent message, only is permitted.
///
/// A task that represents an asynchronous send operation for delivering the message. The task result
/// contains the sent message.
///
- Task 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 components = null, ISticker[] stickers = null, Embed[] embeds = null);
+ Task 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 components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None);
///
/// Sends a file to this message channel with an optional caption.
///
@@ -137,11 +140,12 @@ namespace Discord
/// The message components to be included with this message. Used for interactions.
/// A collection of stickers to send with the file.
/// A array of s to send with this response. Max 10.
+ /// A message flag to be applied to the sent message, only is permitted.
///
/// A task that represents an asynchronous send operation for delivering the message. The task result
/// contains the sent message.
///
- Task SendFileAsync(FileAttachment attachment, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null);
+ Task SendFileAsync(FileAttachment attachment, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None);
///
/// Sends a collection of files to this message channel.
///
@@ -166,11 +170,12 @@ namespace Discord
/// The message components to be included with this message. Used for interactions.
/// A collection of stickers to send with the file.
/// A array of s to send with this response. Max 10.
+ /// A message flag to be applied to the sent message, only is permitted.
///
/// A task that represents an asynchronous send operation for delivering the message. The task result
/// contains the sent message.
///
- Task SendFilesAsync(IEnumerable attachments, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null);
+ Task SendFilesAsync(IEnumerable attachments, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None);
///
/// Gets a message from this message channel.
diff --git a/src/Discord.Net.Rest/API/Rest/CreateMessageParams.cs b/src/Discord.Net.Rest/API/Rest/CreateMessageParams.cs
index 5996c7e83..466ad41e3 100644
--- a/src/Discord.Net.Rest/API/Rest/CreateMessageParams.cs
+++ b/src/Discord.Net.Rest/API/Rest/CreateMessageParams.cs
@@ -28,6 +28,9 @@ namespace Discord.API.Rest
[JsonProperty("sticker_ids")]
public Optional Stickers { get; set; }
+
+ [JsonProperty("flags")]
+ public Optional Flags { get; set; }
public CreateMessageParams(string content)
{
diff --git a/src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs b/src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs
index b5087cd2f..d66fd5e51 100644
--- a/src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs
+++ b/src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs
@@ -266,8 +266,10 @@ namespace Discord.Rest
}
/// Message content is too long, length must be less or equal to .
+ /// The only valid are and .
public static async Task SendMessageAsync(IMessageChannel channel, BaseDiscordClient client,
- string text, bool isTTS, Embed embed, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, RequestOptions options, Embed[] embeds)
+ string text, bool isTTS, Embed embed, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, RequestOptions options, Embed[] embeds, MessageFlags flags)
{
embeds ??= Array.Empty
public interface IRestMessageChannel : IMessageChannel
{
- ///
- /// Sends a message to this message channel.
- ///
- ///
- /// This method follows the same behavior as described in .
- /// Please visit its documentation for more details on this method.
- ///
- /// The message to be sent.
- /// Determines whether the message should be read aloud by Discord or not.
- /// The to be sent.
- /// The options to be used when sending the request.
- ///
- /// Specifies if notifications are sent for mentioned users and roles in the message .
- /// If null, all mentioned roles and users will be notified.
- ///
- /// The message references to be included. Used to reply to specific messages.
- /// The message components to be included with this message. Used for interactions.
- /// A collection of stickers to send with the message.
- /// A array of s to send with this response. Max 10.
- ///
- /// A task that represents an asynchronous send operation for delivering the message. The task result
- /// contains the sent message.
- ///
- new Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null);
- ///
- /// Sends a file to this message channel with an optional caption.
- ///
- ///
- /// This method follows the same behavior as described in
- /// . Please visit
- /// its documentation for more details on this method.
- ///
- /// The file path of the file.
- /// The message to be sent.
- /// Whether the message should be read aloud by Discord or not.
- /// The to be sent.
- /// The options to be used when sending the request.
- /// Whether the message attachment should be hidden as a spoiler.
- ///
- /// Specifies if notifications are sent for mentioned users and roles in the message .
- /// If null, all mentioned roles and users will be notified.
- ///
- /// The message references to be included. Used to reply to specific messages.
- /// The message components to be included with this message. Used for interactions.
- /// A collection of stickers to send with the message.
- /// A array of s to send with this response. Max 10.
- ///
- /// A task that represents an asynchronous send operation for delivering the message. The task result
- /// contains the sent message.
- ///
- new Task SendFileAsync(string filePath, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null);
- ///
- /// Sends a file to this message channel with an optional caption.
- ///
- ///
- /// This method follows the same behavior as described in .
- /// Please visit its documentation for more details on this method.
- ///
- /// The of the file to be sent.
- /// The name of the attachment.
- /// The message to be sent.
- /// Whether the message should be read aloud by Discord or not.
- /// The to be sent.
- /// The options to be used when sending the request.
- /// Whether the message attachment should be hidden as a spoiler.
- ///
- /// Specifies if notifications are sent for mentioned users and roles in the message .
- /// If null, all mentioned roles and users will be notified.
- ///
- /// The message references to be included. Used to reply to specific messages.
- /// The message components to be included with this message. Used for interactions.
- /// A collection of stickers to send with the message.
- /// A array of s to send with this response. Max 10.
- ///
- /// A task that represents an asynchronous send operation for delivering the message. The task result
- /// contains the sent message.
- ///
- new Task 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 components = null, ISticker[] stickers = null, Embed[] embeds = null);
+ ///
+ new Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None);
+
+ ///
+ new Task SendFileAsync(string filePath, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None);
+
+ ///
+ new Task 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 components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None);
///
/// Gets a message from this message channel.
diff --git a/src/Discord.Net.Rest/Entities/Channels/RestDMChannel.cs b/src/Discord.Net.Rest/Entities/Channels/RestDMChannel.cs
index 36b190e56..3bf43a594 100644
--- a/src/Discord.Net.Rest/Entities/Channels/RestDMChannel.cs
+++ b/src/Discord.Net.Rest/Entities/Channels/RestDMChannel.cs
@@ -94,8 +94,12 @@ namespace Discord.Rest
///
/// Message content is too long, length must be less or equal to .
- public Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendMessageAsync(this, Discord, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, embeds);
+ /// The only valid are and .
+ public Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null,
+ RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null,
+ MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendMessageAsync(this, Discord, text, isTTS, embed, allowedMentions, messageReference,
+ components, stickers, options, embeds, flags);
///
///
@@ -122,22 +126,39 @@ namespace Discord.Rest
/// is in an invalid format.
/// An I/O error occurred while opening the file.
/// Message content is too long, length must be less or equal to .
- public Task SendFileAsync(string filePath, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFileAsync(this, Discord, filePath, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, isSpoiler, embeds);
+ /// The only valid are and .
+ public Task SendFileAsync(string filePath, string text, bool isTTS = false, Embed embed = null,
+ RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFileAsync(this, Discord, filePath, text, isTTS, embed, allowedMentions, messageReference,
+ components, stickers, options, isSpoiler, embeds, flags);
///
/// Message content is too long, length must be less or equal to .
- public Task SendFileAsync(Stream stream, string filename, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFileAsync(this, Discord, stream, filename, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, isSpoiler, embeds);
+ public Task SendFileAsync(Stream stream, string filename, string text, bool isTTS = false,
+ Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFileAsync(this, Discord, stream, filename, text, isTTS, embed, allowedMentions,
+ messageReference, components, stickers, options, isSpoiler, embeds, flags);
///
/// Message content is too long, length must be less or equal to .
- public Task SendFileAsync(FileAttachment attachment, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFileAsync(this, Discord, attachment, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, embeds);
+ public Task SendFileAsync(FileAttachment attachment, string text, bool isTTS = false,
+ Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFileAsync(this, Discord, attachment, text, isTTS, embed, allowedMentions, messageReference,
+ components, stickers, options, embeds, flags);
///
/// Message content is too long, length must be less or equal to .
- public Task SendFilesAsync(IEnumerable attachments, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFilesAsync(this, Discord, attachments, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, embeds);
+ public Task SendFilesAsync(IEnumerable attachments, string text, bool isTTS = false,
+ Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFilesAsync(this, Discord, attachments, text, isTTS, embed, allowedMentions, messageReference,
+ components, stickers, options, embeds, flags);
///
public Task DeleteMessageAsync(ulong messageId, RequestOptions options = null)
@@ -219,20 +240,38 @@ namespace Discord.Rest
async Task> IMessageChannel.GetPinnedMessagesAsync(RequestOptions options)
=> await GetPinnedMessagesAsync(options).ConfigureAwait(false);
///
- async Task IMessageChannel.SendFileAsync(string filePath, string text, bool isTTS, Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFileAsync(filePath, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendFileAsync(string filePath, string text, bool isTTS, Embed embed,
+ RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFileAsync(filePath, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference,
+ components, stickers, embeds, flags).ConfigureAwait(false);
+
///
- async Task IMessageChannel.SendFileAsync(Stream stream, string filename, string text, bool isTTS, Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFileAsync(stream, filename, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendFileAsync(Stream stream, string filename, string text, bool isTTS,
+ Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFileAsync(stream, filename, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference,
+ components, stickers, embeds, flags).ConfigureAwait(false);
+
///
- async Task IMessageChannel.SendFileAsync(FileAttachment attachment, string text, bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFileAsync(attachment, text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendFileAsync(FileAttachment attachment, string text, bool isTTS,
+ Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFileAsync(attachment, text, isTTS, embed, options, allowedMentions, messageReference, components,
+ stickers, embeds, flags).ConfigureAwait(false);
+
///
- async Task IMessageChannel.SendFilesAsync(IEnumerable attachments, string text, bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFilesAsync(attachments, text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendFilesAsync(IEnumerable attachments, string text,
+ bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFilesAsync(attachments, text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds, flags).ConfigureAwait(false);
+
///
- async Task IMessageChannel.SendMessageAsync(string text, bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendMessageAsync(text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendMessageAsync(string text, bool isTTS, Embed embed, RequestOptions options,
+ AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components,
+ ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendMessageAsync(text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds, flags).ConfigureAwait(false);
+
#endregion
#region IChannel
diff --git a/src/Discord.Net.Rest/Entities/Channels/RestGroupChannel.cs b/src/Discord.Net.Rest/Entities/Channels/RestGroupChannel.cs
index 03858fbbe..d21852f93 100644
--- a/src/Discord.Net.Rest/Entities/Channels/RestGroupChannel.cs
+++ b/src/Discord.Net.Rest/Entities/Channels/RestGroupChannel.cs
@@ -104,8 +104,12 @@ namespace Discord.Rest
///
/// Message content is too long, length must be less or equal to .
- public Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendMessageAsync(this, Discord, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, embeds);
+ /// The only valid are and .
+ public Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null,
+ RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null,
+ MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendMessageAsync(this, Discord, text, isTTS, embed, allowedMentions, messageReference,
+ components, stickers, options, embeds, flags);
///
///
@@ -132,20 +136,40 @@ namespace Discord.Rest
/// is in an invalid format.
/// An I/O error occurred while opening the file.
/// Message content is too long, length must be less or equal to .
- public Task SendFileAsync(string filePath, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFileAsync(this, Discord, filePath, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, isSpoiler, embeds);
+ /// The only valid are and .
+ public Task SendFileAsync(string filePath, string text, bool isTTS = false, Embed embed = null,
+ RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFileAsync(this, Discord, filePath, text, isTTS, embed, allowedMentions, messageReference,
+ components, stickers, options, isSpoiler, embeds, flags);
///
/// Message content is too long, length must be less or equal to .
- public Task SendFileAsync(Stream stream, string filename, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFileAsync(this, Discord, stream, filename, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, isSpoiler, embeds);
+ /// The only valid are and .
+ public Task SendFileAsync(Stream stream, string filename, string text, bool isTTS = false,
+ Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFileAsync(this, Discord, stream, filename, text, isTTS, embed, allowedMentions,
+ messageReference, components, stickers, options, isSpoiler, embeds, flags);
///
/// Message content is too long, length must be less or equal to .
- public Task SendFileAsync(FileAttachment attachment, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFileAsync(this, Discord, attachment, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, embeds);
+ /// The only valid are and .
+ public Task SendFileAsync(FileAttachment attachment, string text, bool isTTS = false,
+ Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFileAsync(this, Discord, attachment, text, isTTS, embed, allowedMentions, messageReference,
+ components, stickers, options, embeds, flags);
///
/// Message content is too long, length must be less or equal to .
- public Task SendFilesAsync(IEnumerable attachments, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFilesAsync(this, Discord, attachments, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, embeds);
+ /// The only valid are and .
+ public Task SendFilesAsync(IEnumerable attachments, string text, bool isTTS = false,
+ Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFilesAsync(this, Discord, attachments, text, isTTS, embed, allowedMentions,
+ messageReference, components, stickers, options, embeds, flags);
///
public Task TriggerTypingAsync(RequestOptions options = null)
=> ChannelHelper.TriggerTypingAsync(this, Discord, options);
@@ -197,17 +221,41 @@ namespace Discord.Rest
async Task> IMessageChannel.GetPinnedMessagesAsync(RequestOptions options)
=> await GetPinnedMessagesAsync(options).ConfigureAwait(false);
- async Task IMessageChannel.SendFileAsync(string filePath, string text, bool isTTS, Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFileAsync(filePath, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
-
- async Task IMessageChannel.SendFileAsync(Stream stream, string filename, string text, bool isTTS, Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFileAsync(stream, filename, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
- async Task IMessageChannel.SendFileAsync(FileAttachment attachment, string text, bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFileAsync(attachment, text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
- async Task IMessageChannel.SendFilesAsync(IEnumerable attachments, string text, bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFilesAsync(attachments, text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
- async Task IMessageChannel.SendMessageAsync(string text, bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendMessageAsync(text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ ///
+ async Task IMessageChannel.SendFileAsync(string filePath, string text, bool isTTS, Embed embed,
+ RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFileAsync(filePath, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference,
+ components, stickers, embeds, flags).ConfigureAwait(false);
+
+ ///
+ async Task IMessageChannel.SendFileAsync(Stream stream, string filename, string text, bool isTTS,
+ Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFileAsync(stream, filename, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference,
+ components, stickers, embeds, flags).ConfigureAwait(false);
+
+ ///
+ async Task IMessageChannel.SendFileAsync(FileAttachment attachment, string text, bool isTTS,
+ Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFileAsync(attachment, text, isTTS, embed, options, allowedMentions, messageReference, components,
+ stickers, embeds, flags).ConfigureAwait(false);
+
+ ///
+ async Task IMessageChannel.SendFilesAsync(IEnumerable attachments, string text,
+ bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFilesAsync(attachments, text, isTTS, embed, options, allowedMentions, messageReference, components,
+ stickers, embeds, flags).ConfigureAwait(false);
+
+ ///
+ async Task IMessageChannel.SendMessageAsync(string text, bool isTTS, Embed embed, RequestOptions options,
+ AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components,
+ ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendMessageAsync(text, isTTS, embed, options, allowedMentions, messageReference, components,
+ stickers, embeds, flags).ConfigureAwait(false);
+
#endregion
#region IAudioChannel
diff --git a/src/Discord.Net.Rest/Entities/Channels/RestTextChannel.cs b/src/Discord.Net.Rest/Entities/Channels/RestTextChannel.cs
index f1bdee65c..eac6b2a9f 100644
--- a/src/Discord.Net.Rest/Entities/Channels/RestTextChannel.cs
+++ b/src/Discord.Net.Rest/Entities/Channels/RestTextChannel.cs
@@ -103,8 +103,12 @@ namespace Discord.Rest
///
/// Message content is too long, length must be less or equal to .
- public Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendMessageAsync(this, Discord, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, embeds);
+ /// The only valid are and .
+ public Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null,
+ RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null,
+ MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendMessageAsync(this, Discord, text, isTTS, embed, allowedMentions, messageReference,
+ components, stickers, options, embeds, flags);
///
///
@@ -131,23 +135,42 @@ namespace Discord.Rest
/// is in an invalid format.
/// An I/O error occurred while opening the file.
/// Message content is too long, length must be less or equal to .
- public Task SendFileAsync(string filePath, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFileAsync(this, Discord, filePath, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, isSpoiler, embeds);
+ /// The only valid are and .
+ public Task SendFileAsync(string filePath, string text, bool isTTS = false, Embed embed = null,
+ RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFileAsync(this, Discord, filePath, text, isTTS, embed, allowedMentions, messageReference,
+ components, stickers, options, isSpoiler, embeds, flags);
///
/// Message content is too long, length must be less or equal to .
- public Task SendFileAsync(Stream stream, string filename, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFileAsync(this, Discord, stream, filename, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, isSpoiler, embeds);
+ /// The only valid are and .
+ public Task SendFileAsync(Stream stream, string filename, string text, bool isTTS = false,
+ Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFileAsync(this, Discord, stream, filename, text, isTTS, embed, allowedMentions, messageReference,
+ components, stickers, options, isSpoiler, embeds, flags);
///
/// Message content is too long, length must be less or equal to .
- public Task SendFileAsync(FileAttachment attachment, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFileAsync(this, Discord, attachment, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, embeds);
+ /// The only valid are and .
+ public Task SendFileAsync(FileAttachment attachment, string text, bool isTTS = false,
+ Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFileAsync(this, Discord, attachment, text, isTTS, embed, allowedMentions, messageReference,
+ components, stickers, options, embeds, flags);
///
/// Message content is too long, length must be less or equal to .
- public Task SendFilesAsync(IEnumerable attachments, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFilesAsync(this, Discord, attachments, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, embeds);
+ /// The only valid are and .
+ public Task SendFilesAsync(IEnumerable attachments, string text, bool isTTS = false,
+ Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFilesAsync(this, Discord, attachments, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, embeds, flags);
///
public Task DeleteMessageAsync(ulong messageId, RequestOptions options = null)
@@ -332,24 +355,37 @@ namespace Discord.Rest
=> await GetPinnedMessagesAsync(options).ConfigureAwait(false);
///
- async Task IMessageChannel.SendFileAsync(string filePath, string text, bool isTTS, Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFileAsync(filePath, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendFileAsync(string filePath, string text, bool isTTS, Embed embed,
+ RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFileAsync(filePath, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference,
+ components, stickers, embeds, flags).ConfigureAwait(false);
///
- async Task IMessageChannel.SendFileAsync(Stream stream, string filename, string text, bool isTTS, Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFileAsync(stream, filename, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendFileAsync(Stream stream, string filename, string text, bool isTTS,
+ Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFileAsync(stream, filename, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference,
+ components, stickers, embeds, flags).ConfigureAwait(false);
///
- async Task IMessageChannel.SendFileAsync(FileAttachment attachment, string text, bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFileAsync(attachment, text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendFileAsync(FileAttachment attachment, string text, bool isTTS,
+ Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFileAsync(attachment, text, isTTS, embed, options, allowedMentions, messageReference, components,
+ stickers, embeds, flags).ConfigureAwait(false);
///
- async Task IMessageChannel.SendFilesAsync(IEnumerable attachments, string text, bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFilesAsync(attachments, text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendFilesAsync(IEnumerable attachments, string text,
+ bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFilesAsync(attachments, text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds, flags).ConfigureAwait(false);
///
- async Task IMessageChannel.SendMessageAsync(string text, bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendMessageAsync(text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendMessageAsync(string text, bool isTTS, Embed embed, RequestOptions options,
+ AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components,
+ ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendMessageAsync(text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds, flags).ConfigureAwait(false);
#endregion
#region IGuildChannel
diff --git a/src/Discord.Net.WebSocket/Entities/Channels/ISocketMessageChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/ISocketMessageChannel.cs
index 3e9b635de..b632bcb60 100644
--- a/src/Discord.Net.WebSocket/Entities/Channels/ISocketMessageChannel.cs
+++ b/src/Discord.Net.WebSocket/Entities/Channels/ISocketMessageChannel.cs
@@ -18,83 +18,22 @@ namespace Discord.WebSocket
///
IReadOnlyCollection CachedMessages { get; }
- ///
- /// Sends a message to this message channel.
- ///
- ///
- /// This method follows the same behavior as described in .
- /// Please visit its documentation for more details on this method.
- ///
- /// The message to be sent.
- /// Determines whether the message should be read aloud by Discord or not.
- /// The to be sent.
- /// The options to be used when sending the request.
- ///
- /// Specifies if notifications are sent for mentioned users and roles in the message .
- /// If null, all mentioned roles and users will be notified.
- ///
- /// The message references to be included. Used to reply to specific messages.
- /// The message components to be included with this message. Used for interactions.
- /// A collection of stickers to send with the message.
- /// A array of s to send with this response. Max 10.
- ///
- /// A task that represents an asynchronous send operation for delivering the message. The task result
- /// contains the sent message.
- ///
- new Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null);
- ///
- /// Sends a file to this message channel with an optional caption.
- ///
- ///
- /// This method follows the same behavior as described in .
- /// Please visit its documentation for more details on this method.
- ///
- /// The file path of the file.
- /// The message to be sent.
- /// Whether the message should be read aloud by Discord or not.
- /// The to be sent.
- /// The options to be used when sending the request.
- /// Whether the message attachment should be hidden as a spoiler.
- ///
- /// Specifies if notifications are sent for mentioned users and roles in the message .
- /// If null, all mentioned roles and users will be notified.
- ///
- /// The message references to be included. Used to reply to specific messages.
- /// The message components to be included with this message. Used for interactions.
- /// A collection of stickers to send with the file.
- /// A array of s to send with this response. Max 10.
- ///
- /// A task that represents an asynchronous send operation for delivering the message. The task result
- /// contains the sent message.
- ///
- new Task SendFileAsync(string filePath, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null);
- ///
- /// Sends a file to this message channel with an optional caption.
- ///
- ///
- /// This method follows the same behavior as described in .
- /// Please visit its documentation for more details on this method.
- ///
- /// The of the file to be sent.
- /// The name of the attachment.
- /// The message to be sent.
- /// Whether the message should be read aloud by Discord or not.
- /// The to be sent.
- /// The options to be used when sending the request.
- /// Whether the message attachment should be hidden as a spoiler.
- ///
- /// Specifies if notifications are sent for mentioned users and roles in the message .
- /// If null, all mentioned roles and users will be notified.
- ///
- /// The message references to be included. Used to reply to specific messages.
- /// The message components to be included with this message. Used for interactions.
- /// A collection of stickers to send with the file.
- /// A array of s to send with this response. Max 10.
- ///
- /// A task that represents an asynchronous send operation for delivering the message. The task result
- /// contains the sent message.
- ///
- new Task 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 components = null, ISticker[] stickers = null, Embed[] embeds = null);
+ ///
+ new Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null,
+ RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null,
+ MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None);
+
+ ///
+ new Task SendFileAsync(string filePath, string text = null, bool isTTS = false, Embed embed = null,
+ RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None);
+
+ ///
+ new Task 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 components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None);
///
/// Gets a cached message from this channel.
diff --git a/src/Discord.Net.WebSocket/Entities/Channels/SocketDMChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/SocketDMChannel.cs
index f4fe12755..17ab4ebe3 100644
--- a/src/Discord.Net.WebSocket/Entities/Channels/SocketDMChannel.cs
+++ b/src/Discord.Net.WebSocket/Entities/Channels/SocketDMChannel.cs
@@ -139,24 +139,48 @@ namespace Discord.WebSocket
///
/// Message content is too long, length must be less or equal to .
- public Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendMessageAsync(this, Discord, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, embeds);
+ /// The only valid are and .
+ public Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null,
+ RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null,
+ MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendMessageAsync(this, Discord, text, isTTS, embed, allowedMentions, messageReference,
+ components, stickers, options, embeds, flags);
///
- public Task SendFileAsync(string filePath, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFileAsync(this, Discord, filePath, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, isSpoiler, embeds);
+ /// The only valid are and .
+ public Task SendFileAsync(string filePath, string text, bool isTTS = false, Embed embed = null,
+ RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFileAsync(this, Discord, filePath, text, isTTS, embed, allowedMentions, messageReference,
+ components, stickers, options, isSpoiler, embeds, flags);
///
/// Message content is too long, length must be less or equal to .
- public Task SendFileAsync(Stream stream, string filename, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFileAsync(this, Discord, stream, filename, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, isSpoiler, embeds);
+ /// The only valid are and .
+ public Task SendFileAsync(Stream stream, string filename, string text, bool isTTS = false,
+ Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFileAsync(this, Discord, stream, filename, text, isTTS, embed, allowedMentions,
+ messageReference, components, stickers, options, isSpoiler, embeds, flags);
///
/// Message content is too long, length must be less or equal to .
- public Task SendFileAsync(FileAttachment attachment, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFileAsync(this, Discord, attachment, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, embeds);
+ /// The only valid are and .
+ public Task SendFileAsync(FileAttachment attachment, string text, bool isTTS = false,
+ Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFileAsync(this, Discord, attachment, text, isTTS, embed, allowedMentions,
+ messageReference, components, stickers, options, embeds, flags);
///
/// Message content is too long, length must be less or equal to .
- public Task SendFilesAsync(IEnumerable attachments, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFilesAsync(this, Discord, attachments, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, embeds);
+ /// The only valid are and .
+ public Task SendFilesAsync(IEnumerable attachments, string text, bool isTTS = false,
+ Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFilesAsync(this, Discord, attachments, text, isTTS, embed, allowedMentions,
+ messageReference, components, stickers, options, embeds, flags);
///
public Task DeleteMessageAsync(ulong messageId, RequestOptions options = null)
@@ -255,20 +279,37 @@ namespace Discord.WebSocket
async Task> IMessageChannel.GetPinnedMessagesAsync(RequestOptions options)
=> await GetPinnedMessagesAsync(options).ConfigureAwait(false);
///
- async Task IMessageChannel.SendFileAsync(string filePath, string text, bool isTTS, Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFileAsync(filePath, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendFileAsync(string filePath, string text, bool isTTS, Embed embed,
+ RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFileAsync(filePath, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference,
+ components, stickers, embeds, flags).ConfigureAwait(false);
+
///
- async Task IMessageChannel.SendFileAsync(Stream stream, string filename, string text, bool isTTS, Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFileAsync(stream, filename, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendFileAsync(Stream stream, string filename, string text, bool isTTS,
+ Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFileAsync(stream, filename, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference,
+ components, stickers, embeds, flags).ConfigureAwait(false);
+
///
- async Task IMessageChannel.SendFileAsync(FileAttachment attachment, string text, bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFileAsync(attachment, text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendFileAsync(FileAttachment attachment, string text, bool isTTS,
+ Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFileAsync(attachment, text, isTTS, embed, options, allowedMentions, messageReference, components,
+ stickers, embeds, flags).ConfigureAwait(false);
+
///
- async Task IMessageChannel.SendFilesAsync(IEnumerable attachments, string text, bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFilesAsync(attachments, text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendFilesAsync(IEnumerable attachments, string text,
+ bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFilesAsync(attachments, text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds, flags).ConfigureAwait(false);
+
///
- async Task IMessageChannel.SendMessageAsync(string text, bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendMessageAsync(text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendMessageAsync(string text, bool isTTS, Embed embed, RequestOptions options,
+ AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components,
+ ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendMessageAsync(text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds, flags).ConfigureAwait(false);
#endregion
#region IChannel
diff --git a/src/Discord.Net.WebSocket/Entities/Channels/SocketGroupChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/SocketGroupChannel.cs
index c8137784f..e17f7e41c 100644
--- a/src/Discord.Net.WebSocket/Entities/Channels/SocketGroupChannel.cs
+++ b/src/Discord.Net.WebSocket/Entities/Channels/SocketGroupChannel.cs
@@ -178,24 +178,48 @@ namespace Discord.WebSocket
///
/// Message content is too long, length must be less or equal to .
- public Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendMessageAsync(this, Discord, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, embeds);
+ /// The only valid are and .
+ public Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null,
+ RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null,
+ MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendMessageAsync(this, Discord, text, isTTS, embed, allowedMentions, messageReference,
+ components, stickers, options, embeds, flags);
///
- public Task SendFileAsync(string filePath, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFileAsync(this, Discord, filePath, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, isSpoiler, embeds);
+ /// The only valid are and .
+ public Task SendFileAsync(string filePath, string text, bool isTTS = false, Embed embed = null,
+ RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFileAsync(this, Discord, filePath, text, isTTS, embed, allowedMentions, messageReference,
+ components, stickers, options, isSpoiler, embeds, flags);
///
/// Message content is too long, length must be less or equal to .
- public Task SendFileAsync(Stream stream, string filename, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFileAsync(this, Discord, stream, filename, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, isSpoiler, embeds);
+ /// The only valid are and .
+ public Task SendFileAsync(Stream stream, string filename, string text, bool isTTS = false,
+ Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFileAsync(this, Discord, stream, filename, text, isTTS, embed, allowedMentions,
+ messageReference, components, stickers, options, isSpoiler, embeds, flags);
///
/// Message content is too long, length must be less or equal to .
- public Task SendFileAsync(FileAttachment attachment, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFileAsync(this, Discord, attachment, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, embeds);
+ /// The only valid are and .
+ public Task SendFileAsync(FileAttachment attachment, string text, bool isTTS = false,
+ Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFileAsync(this, Discord, attachment, text, isTTS, embed, allowedMentions,
+ messageReference, components, stickers, options, embeds, flags);
///
/// Message content is too long, length must be less or equal to .
- public Task SendFilesAsync(IEnumerable attachments, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFilesAsync(this, Discord, attachments, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, embeds);
+ /// The only valid are and .
+ public Task SendFilesAsync(IEnumerable attachments, string text, bool isTTS = false,
+ Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFilesAsync(this, Discord, attachments, text, isTTS, embed, allowedMentions,
+ messageReference, components, stickers, options, embeds, flags);
///
public Task DeleteMessageAsync(ulong messageId, RequestOptions options = null)
@@ -327,21 +351,37 @@ namespace Discord.WebSocket
=> await GetPinnedMessagesAsync(options).ConfigureAwait(false);
///
- async Task IMessageChannel.SendFileAsync(string filePath, string text, bool isTTS, Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFileAsync(filePath, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendFileAsync(string filePath, string text, bool isTTS, Embed embed,
+ RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFileAsync(filePath, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference,
+ components, stickers, embeds, flags).ConfigureAwait(false);
+
///
- async Task IMessageChannel.SendFileAsync(Stream stream, string filename, string text, bool isTTS, Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFileAsync(stream, filename, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendFileAsync(Stream stream, string filename, string text, bool isTTS,
+ Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFileAsync(stream, filename, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference,
+ components, stickers, embeds, flags).ConfigureAwait(false);
+
///
- async Task IMessageChannel.SendFileAsync(FileAttachment attachment, string text, bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFileAsync(attachment, text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendFileAsync(FileAttachment attachment, string text, bool isTTS,
+ Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFileAsync(attachment, text, isTTS, embed, options, allowedMentions, messageReference, components,
+ stickers, embeds, flags).ConfigureAwait(false);
+
///
- async Task IMessageChannel.SendFilesAsync(IEnumerable attachments, string text, bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFilesAsync(attachments, text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendFilesAsync(IEnumerable attachments, string text,
+ bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFilesAsync(attachments, text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds, flags).ConfigureAwait(false);
///
- async Task IMessageChannel.SendMessageAsync(string text, bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendMessageAsync(text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendMessageAsync(string text, bool isTTS, Embed embed, RequestOptions options,
+ AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components,
+ ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendMessageAsync(text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds, flags).ConfigureAwait(false);
#endregion
#region IAudioChannel
diff --git a/src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs
index dbf238625..0915409c6 100644
--- a/src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs
+++ b/src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs
@@ -212,27 +212,48 @@ namespace Discord.WebSocket
///
/// Message content is too long, length must be less or equal to .
- public Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendMessageAsync(this, Discord, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, embeds);
-
- ///
- public Task SendFileAsync(string filePath, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFileAsync(this, Discord, filePath, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, isSpoiler, embeds);
-
+ /// The only valid are and .
+ public Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null,
+ RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null,
+ MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendMessageAsync(this, Discord, text, isTTS, embed, allowedMentions, messageReference,
+ components, stickers, options, embeds, flags);
+
+ ///
+ /// The only valid are and .
+ public Task SendFileAsync(string filePath, string text, bool isTTS = false, Embed embed = null,
+ RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFileAsync(this, Discord, filePath, text, isTTS, embed, allowedMentions, messageReference,
+ components, stickers, options, isSpoiler, embeds, flags);
///
/// Message content is too long, length must be less or equal to .
- public Task SendFileAsync(Stream stream, string filename, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFileAsync(this, Discord, stream, filename, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, isSpoiler, embeds);
-
+ /// The only valid are and .
+ public Task SendFileAsync(Stream stream, string filename, string text, bool isTTS = false,
+ Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFileAsync(this, Discord, stream, filename, text, isTTS, embed, allowedMentions,
+ messageReference, components, stickers, options, isSpoiler, embeds, flags);
///
/// Message content is too long, length must be less or equal to .
- public Task SendFileAsync(FileAttachment attachment, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFileAsync(this, Discord, attachment, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, embeds);
-
+ /// The only valid are and .
+ public Task SendFileAsync(FileAttachment attachment, string text, bool isTTS = false,
+ Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFileAsync(this, Discord, attachment, text, isTTS, embed, allowedMentions,
+ messageReference, components, stickers, options, embeds, flags);
///
/// Message content is too long, length must be less or equal to .
- public Task SendFilesAsync(IEnumerable attachments, string text, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null)
- => ChannelHelper.SendFilesAsync(this, Discord, attachments, text, isTTS, embed, allowedMentions, messageReference, components, stickers, options, embeds);
+ /// The only valid are and .
+ public Task SendFilesAsync(IEnumerable attachments, string text, bool isTTS = false,
+ Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null,
+ MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
+ Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
+ => ChannelHelper.SendFilesAsync(this, Discord, attachments, text, isTTS, embed, allowedMentions,
+ messageReference, components, stickers, options, embeds, flags);
///
public Task DeleteMessagesAsync(IEnumerable messages, RequestOptions options = null)
@@ -385,20 +406,38 @@ namespace Discord.WebSocket
=> await GetPinnedMessagesAsync(options).ConfigureAwait(false);
///
- async Task IMessageChannel.SendFileAsync(string filePath, string text, bool isTTS, Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFileAsync(filePath, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendFileAsync(string filePath, string text, bool isTTS, Embed embed,
+ RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFileAsync(filePath, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference,
+ components, stickers, embeds, flags).ConfigureAwait(false);
+
///
- async Task IMessageChannel.SendFileAsync(Stream stream, string filename, string text, bool isTTS, Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFileAsync(stream, filename, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendFileAsync(Stream stream, string filename, string text, bool isTTS,
+ Embed embed, RequestOptions options, bool isSpoiler, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFileAsync(stream, filename, text, isTTS, embed, options, isSpoiler, allowedMentions, messageReference,
+ components, stickers, embeds, flags).ConfigureAwait(false);
+
///
- async Task IMessageChannel.SendFileAsync(FileAttachment attachment, string text, bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFileAsync(attachment, text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendFileAsync(FileAttachment attachment, string text, bool isTTS,
+ Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFileAsync(attachment, text, isTTS, embed, options, allowedMentions, messageReference, components,
+ stickers, embeds, flags).ConfigureAwait(false);
+
///
- async Task IMessageChannel.SendFilesAsync(IEnumerable attachments, string text, bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendFilesAsync(attachments, text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendFilesAsync(IEnumerable attachments, string text,
+ bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference,
+ MessageComponent components, ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendFilesAsync(attachments, text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds, flags).ConfigureAwait(false);
+
///
- async Task IMessageChannel.SendMessageAsync(string text, bool isTTS, Embed embed, RequestOptions options, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, Embed[] embeds)
- => await SendMessageAsync(text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds).ConfigureAwait(false);
+ async Task IMessageChannel.SendMessageAsync(string text, bool isTTS, Embed embed, RequestOptions options,
+ AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components,
+ ISticker[] stickers, Embed[] embeds, MessageFlags flags)
+ => await SendMessageAsync(text, isTTS, embed, options, allowedMentions, messageReference, components, stickers, embeds, flags).ConfigureAwait(false);
+
#endregion
#region INestedChannel
diff --git a/test/Discord.Net.Tests.Unit/MockedEntities/MockedDMChannel.cs b/test/Discord.Net.Tests.Unit/MockedEntities/MockedDMChannel.cs
index 519bab4d9..2a7f8065a 100644
--- a/test/Discord.Net.Tests.Unit/MockedEntities/MockedDMChannel.cs
+++ b/test/Discord.Net.Tests.Unit/MockedEntities/MockedDMChannel.cs
@@ -83,10 +83,10 @@ namespace Discord
throw new NotImplementedException();
}
- public Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent component = null, ISticker[] stickers = null, Embed[] embeds = null) => throw new NotImplementedException();
- public Task SendFileAsync(string filePath, 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) => throw new NotImplementedException();
- public Task 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) => throw new NotImplementedException();
- public Task SendFileAsync(FileAttachment attachment, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent component = null, ISticker[] stickers = null, Embed[] embeds = null) => throw new NotImplementedException();
- public Task SendFilesAsync(IEnumerable attachments, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent component = null, ISticker[] stickers = null, Embed[] embeds = null) => throw new NotImplementedException();
+ public Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent component = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None) => throw new NotImplementedException();
+ public Task SendFileAsync(string filePath, 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, MessageFlags flags = MessageFlags.None) => throw new NotImplementedException();
+ public Task 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, MessageFlags flags = MessageFlags.None) => throw new NotImplementedException();
+ public Task SendFileAsync(FileAttachment attachment, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent component = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None) => throw new NotImplementedException();
+ public Task SendFilesAsync(IEnumerable attachments, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent component = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None) => throw new NotImplementedException();
}
}
diff --git a/test/Discord.Net.Tests.Unit/MockedEntities/MockedGroupChannel.cs b/test/Discord.Net.Tests.Unit/MockedEntities/MockedGroupChannel.cs
index 9c94efffa..b7f98f572 100644
--- a/test/Discord.Net.Tests.Unit/MockedEntities/MockedGroupChannel.cs
+++ b/test/Discord.Net.Tests.Unit/MockedEntities/MockedGroupChannel.cs
@@ -93,17 +93,17 @@ namespace Discord
throw new NotImplementedException();
}
- public Task SendFileAsync(string filePath, 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)
+ public Task SendFileAsync(string filePath, 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, MessageFlags flags = MessageFlags.None)
{
throw new NotImplementedException();
}
- public Task 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)
+ public Task 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, MessageFlags flags = MessageFlags.None)
{
throw new NotImplementedException();
}
- public Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent component = null, ISticker[] stickers = null, Embed[] embeds = null)
+ public Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent component = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
{
throw new NotImplementedException();
}
@@ -113,7 +113,7 @@ namespace Discord
throw new NotImplementedException();
}
- public Task SendFileAsync(FileAttachment attachment, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent component = null, ISticker[] stickers = null, Embed[] embeds = null) => throw new NotImplementedException();
- public Task SendFilesAsync(IEnumerable attachments, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent component = null, ISticker[] stickers = null, Embed[] embeds = null) => throw new NotImplementedException();
+ public Task SendFileAsync(FileAttachment attachment, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent component = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None) => throw new NotImplementedException();
+ public Task SendFilesAsync(IEnumerable attachments, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent component = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None) => throw new NotImplementedException();
}
}
diff --git a/test/Discord.Net.Tests.Unit/MockedEntities/MockedTextChannel.cs b/test/Discord.Net.Tests.Unit/MockedEntities/MockedTextChannel.cs
index ad0af04b2..0dfcab7a5 100644
--- a/test/Discord.Net.Tests.Unit/MockedEntities/MockedTextChannel.cs
+++ b/test/Discord.Net.Tests.Unit/MockedEntities/MockedTextChannel.cs
@@ -176,17 +176,17 @@ namespace Discord
throw new NotImplementedException();
}
- public Task SendFileAsync(string filePath, 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)
+ public Task SendFileAsync(string filePath, 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, MessageFlags flags = MessageFlags.None)
{
throw new NotImplementedException();
}
- public Task 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)
+ public Task 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, MessageFlags flags = MessageFlags.None)
{
throw new NotImplementedException();
}
- public Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent component = null, ISticker[] stickers = null, Embed[] embeds = null)
+ public Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent component = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None)
{
throw new NotImplementedException();
}
@@ -211,9 +211,10 @@ namespace Discord
throw new NotImplementedException();
}
- public Task SendFileAsync(FileAttachment attachment, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent component = null, ISticker[] stickers = null, Embed[] embeds = null) => throw new NotImplementedException();
- public Task SendFilesAsync(IEnumerable attachments, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent component = null, ISticker[] stickers = null, Embed[] embeds = null) => throw new NotImplementedException();
- public Task CreateThreadAsync(string name, ThreadType type = ThreadType.PublicThread, ThreadArchiveDuration autoArchiveDuration = ThreadArchiveDuration.OneDay, IMessage message = null, bool? invitable = null, int? slowmode = null, RequestOptions options = null) => throw new NotImplementedException();
+ public Task SendFileAsync(FileAttachment attachment, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent component = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None) => throw new NotImplementedException();
+ public Task SendFilesAsync(IEnumerable attachments, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null, MessageComponent component = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None) => throw new NotImplementedException();
+ public Task CreateThreadAsync(string name, ThreadType type = ThreadType.PublicThread, ThreadArchiveDuration autoArchiveDuration = ThreadArchiveDuration.OneDay, IMessage message = null, bool? invitable = null, int? slowmode = null, RequestOptions options = null, MessageFlags flags = MessageFlags.None) => throw new NotImplementedException();
public Task CreateInviteToApplicationAsync(DefaultApplications application, int? maxAge = 86400, int? maxUses = null, bool isTemporary = false, bool isUnique = false, RequestOptions options = null) => throw new NotImplementedException();
+ public Task CreateThreadAsync(string name, ThreadType type = ThreadType.PublicThread, ThreadArchiveDuration autoArchiveDuration = ThreadArchiveDuration.OneDay, IMessage message = null, bool? invitable = null, int? slowmode = null, RequestOptions options = null) => throw new NotImplementedException();
}
}