diff --git a/src/Discord.Net.Rest/Entities/Channels/IRestMessageChannel.cs b/src/Discord.Net.Rest/Entities/Channels/IRestMessageChannel.cs
index 42ca20f7c..204546cf3 100644
--- a/src/Discord.Net.Rest/Entities/Channels/IRestMessageChannel.cs
+++ b/src/Discord.Net.Rest/Entities/Channels/IRestMessageChannel.cs
@@ -12,6 +12,10 @@ namespace Discord.Rest
///
/// 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.
@@ -25,12 +29,9 @@ namespace Discord.Rest
/// Sends a file to this message channel with an optional caption.
///
///
- /// This method sends a file as if you are uploading an attachment directly from your Discord client.
- ///
- /// If you wish to upload an image and have it embedded in a embed,
- /// you may upload the file and refer to the file with "attachment://filename.ext" in the
- /// .
- ///
+ /// 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.
@@ -46,12 +47,8 @@ namespace Discord.Rest
/// Sends a file to this message channel with an optional caption.
///
///
- /// This method sends a file as if you are uploading an attachment directly from your Discord client.
- ///
- /// If you wish to upload an image and have it embedded in a embed,
- /// you may upload the file and refer to the file with "attachment://filename.ext" in the
- /// .
- ///
+ /// 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.
@@ -68,6 +65,10 @@ namespace Discord.Rest
///
/// Gets a message from this message channel.
///
+ ///
+ /// This method follows the same behavior as described in .
+ /// Please visit its documentation for more details on this method.
+ ///
/// The snowflake identifier of the message.
/// The options to be used when sending the request.
///
@@ -79,30 +80,9 @@ namespace Discord.Rest
/// Gets the last N messages from this message channel.
///
///
- ///
- /// The returned collection is an asynchronous enumerable object; one must call
- /// to access the individual messages as a
- /// collection.
- ///
- ///
- /// Do not fetch too many messages at once! This may cause unwanted preemptive rate limit or even actual
- /// rate limit, causing your bot to freeze!
- ///
- /// This method will attempt to fetch the number of messages specified under . The
- /// library will attempt to split up the requests according to your and
- /// . In other words, should the user request 500 messages,
- /// and the constant is 100, the request will
- /// be split into 5 individual requests; thus returning 5 individual asynchronous responses, hence the need
- /// of flattening.
+ /// This method follows the same behavior as described in .
+ /// Please visit its documentation for more details on this method.
///
- ///
- /// The following example downloads 300 messages and gets messages that belong to the user
- /// 53905483156684800.
- ///
- /// var messages = await messageChannel.GetMessagesAsync(300).FlattenAsync();
- /// var userMessages = messages.Where(x => x.Author.Id == 53905483156684800);
- ///
- ///
/// The numbers of message to be gotten from.
/// The options to be used when sending the request.
///
@@ -113,34 +93,12 @@ namespace Discord.Rest
/// Gets a collection of messages in this channel.
///
///
- ///
- /// The returned collection is an asynchronous enumerable object; one must call
- /// to access the individual messages as a
- /// collection.
- ///
- ///
- /// Do not fetch too many messages at once! This may cause unwanted preemptive rate limit or even actual
- /// rate limit, causing your bot to freeze!
- ///
- /// This method will attempt to fetch the number of messages specified under around
- /// the message depending on the . The library will
- /// attempt to split up the requests according to your and
- /// . In other words, should the user request 500 messages,
- /// and the constant is 100, the request will
- /// be split into 5 individual requests; thus returning 5 individual asynchronous responses, hence the need
- /// of flattening.
+ /// This method follows the same behavior as described in .
+ /// Please visit its documentation for more details on this method.
///
- ///
- /// The following example gets 5 message prior to the message identifier 442012544660537354.
- ///
- /// var messages = await channel.GetMessagesAsync(442012544660537354, Direction.Before, 5).FlattenAsync();
- ///
- ///
/// The ID of the starting message to get the messages from.
/// The direction of the messages to be gotten from.
/// The numbers of message to be gotten from.
- /// The that determines whether the object should be fetched from
- /// cache.
/// The options to be used when sending the request.
///
/// Paged collection of messages.
@@ -150,34 +108,12 @@ namespace Discord.Rest
/// Gets a collection of messages in this channel.
///
///
- ///
- /// The returned collection is an asynchronous enumerable object; one must call
- /// to access the individual messages as a
- /// collection.
- ///
- ///
- /// Do not fetch too many messages at once! This may cause unwanted preemptive rate limit or even actual
- /// rate limit, causing your bot to freeze!
- ///
- /// This method will attempt to fetch the number of messages specified under around
- /// the message depending on the . The library will
- /// attempt to split up the requests according to your and
- /// . In other words, should the user request 500 messages,
- /// and the constant is 100, the request will
- /// be split into 5 individual requests; thus returning 5 individual asynchronous responses, hence the need
- /// of flattening.
+ /// This method follows the same behavior as described in .
+ /// Please visit its documentation for more details on this method.
///
- ///
- /// The following example gets 5 message prior to a specific message, oldMessage.
- ///
- /// var messages = await channel.GetMessagesAsync(oldMessage, Direction.Before, 5).FlattenAsync();
- ///
- ///
/// The starting message to get the messages from.
/// The direction of the messages to be gotten from.
/// The numbers of message to be gotten from.
- /// The that determines whether the object should be fetched from
- /// cache.
/// The options to be used when sending the request.
///
/// Paged collection of messages.
@@ -186,6 +122,10 @@ namespace Discord.Rest
///
/// Gets a collection of pinned messages in this channel.
///
+ ///
+ /// This method follows the same behavior as described in .
+ /// Please visit its documentation for more details on this method.
+ ///
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous get operation for retrieving pinned messages in this channel.
diff --git a/src/Discord.Net.WebSocket/Entities/Channels/ISocketMessageChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/ISocketMessageChannel.cs
index 61a70d156..3c824166f 100644
--- a/src/Discord.Net.WebSocket/Entities/Channels/ISocketMessageChannel.cs
+++ b/src/Discord.Net.WebSocket/Entities/Channels/ISocketMessageChannel.cs
@@ -21,6 +21,10 @@ namespace Discord.WebSocket
///
/// 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.
@@ -34,12 +38,8 @@ namespace Discord.WebSocket
/// Sends a file to this message channel with an optional caption.
///
///
- /// This method sends a file as if you are uploading an attachment directly from your Discord client.
- ///
- /// If you wish to upload an image and have it embedded in a embed,
- /// you may upload the file and refer to the file with "attachment://filename.ext" in the
- /// .
- ///
+ /// 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.
@@ -55,12 +55,8 @@ namespace Discord.WebSocket
/// Sends a file to this message channel with an optional caption.
///
///
- /// This method sends a file as if you are uploading an attachment directly from your Discord client.
- ///
- /// If you wish to upload an image and have it embedded in a embed,
- /// you may upload the file and refer to the file with "attachment://filename.ext" in the
- /// .
- ///
+ /// 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.
@@ -163,12 +159,16 @@ namespace Discord.WebSocket
///
IReadOnlyCollection GetCachedMessages(IMessage fromMessage, Direction dir, int limit = DiscordConfig.MaxMessagesPerBatch);
///
- /// Gets a collection of pinned messages in this channel.
+ /// Gets a read-only collection of pinned messages in this channel.
///
+ ///
+ /// This method follows the same behavior as described in .
+ /// Please visit its documentation for more details on this method.
+ ///
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous get operation for retrieving pinned messages in this channel.
- /// The task result contains a collection of messages found in the pinned messages.
+ /// The task result contains a read-only collection of messages found in the pinned messages.
///
new Task> GetPinnedMessagesAsync(RequestOptions options = null);
}
diff --git a/src/Discord.Net.WebSocket/Entities/Channels/SocketDMChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/SocketDMChannel.cs
index 6b6577167..cd03505ef 100644
--- a/src/Discord.Net.WebSocket/Entities/Channels/SocketDMChannel.cs
+++ b/src/Discord.Net.WebSocket/Entities/Channels/SocketDMChannel.cs
@@ -78,30 +78,9 @@ namespace Discord.WebSocket
/// Gets the last N messages from this message channel.
///
///
- ///
- /// The returned collection is an asynchronous enumerable object; one must call
- /// to access the individual messages as a
- /// collection.
- ///
- ///
- /// Do not fetch too many messages at once! This may cause unwanted preemptive rate limit or even actual
- /// rate limit, causing your bot to freeze!
- ///
- /// This method will attempt to fetch the number of messages specified under . The
- /// library will attempt to split up the requests according to your and
- /// . In other words, should the user request 500 messages,
- /// and the constant is 100, the request will
- /// be split into 5 individual requests; thus returning 5 individual asynchronous responses, hence the need
- /// of flattening.
+ /// This method follows the same behavior as described in .
+ /// Please visit its documentation for more details on this method.
///
- ///
- /// The following example downloads 300 messages and gets messages that belong to the user
- /// 53905483156684800.
- ///
- /// var messages = await messageChannel.GetMessagesAsync(300).FlattenAsync();
- /// var userMessages = messages.Where(x => x.Author.Id == 53905483156684800);
- ///
- ///
/// The numbers of message to be gotten from.
/// The options to be used when sending the request.
///
@@ -113,29 +92,9 @@ namespace Discord.WebSocket
/// Gets a collection of messages in this channel.
///
///
- ///
- /// The returned collection is an asynchronous enumerable object; one must call
- /// to access the individual messages as a
- /// collection.
- ///
- ///
- /// Do not fetch too many messages at once! This may cause unwanted preemptive rate limit or even actual
- /// rate limit, causing your bot to freeze!
- ///
- /// This method will attempt to fetch the number of messages specified under around
- /// the message depending on the . The library will
- /// attempt to split up the requests according to your and
- /// . In other words, should the user request 500 messages,
- /// and the constant is 100, the request will
- /// be split into 5 individual requests; thus returning 5 individual asynchronous responses, hence the need
- /// of flattening.
+ /// This method follows the same behavior as described in .
+ /// Please visit its documentation for more details on this method.
///
- ///
- /// The following example gets 5 message prior to the message identifier 442012544660537354.
- ///
- /// var messages = await channel.GetMessagesAsync(442012544660537354, Direction.Before, 5).FlattenAsync();
- ///
- ///
/// The ID of the starting message to get the messages from.
/// The direction of the messages to be gotten from.
/// The numbers of message to be gotten from.
@@ -149,29 +108,9 @@ namespace Discord.WebSocket
/// Gets a collection of messages in this channel.
///
///
- ///
- /// The returned collection is an asynchronous enumerable object; one must call
- /// to access the individual messages as a
- /// collection.
- ///
- ///
- /// Do not fetch too many messages at once! This may cause unwanted preemptive rate limit or even actual
- /// rate limit, causing your bot to freeze!
- ///
- /// This method will attempt to fetch the number of messages specified under around
- /// the message depending on the . The library will
- /// attempt to split up the requests according to your and
- /// . In other words, should the user request 500 messages,
- /// and the constant is 100, the request will
- /// be split into 5 individual requests; thus returning 5 individual asynchronous responses, hence the need
- /// of flattening.
+ /// This method follows the same behavior as described in .
+ /// Please visit its documentation for more details on this method.
///
- ///
- /// The following example gets 5 message prior to a specific message, oldMessage.
- ///
- /// var messages = await channel.GetMessagesAsync(oldMessage, Direction.Before, 5).FlattenAsync();
- ///
- ///
/// The starting message to get the messages from.
/// The direction of the messages to be gotten from.
/// The numbers of message to be gotten from.
diff --git a/src/Discord.Net.WebSocket/Entities/Channels/SocketGroupChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/SocketGroupChannel.cs
index 1fc289f41..07b7066b9 100644
--- a/src/Discord.Net.WebSocket/Entities/Channels/SocketGroupChannel.cs
+++ b/src/Discord.Net.WebSocket/Entities/Channels/SocketGroupChannel.cs
@@ -81,6 +81,19 @@ namespace Discord.WebSocket
///
public SocketMessage GetCachedMessage(ulong id)
=> _messages?.Get(id);
+ ///
+ /// Gets a message from this message channel.
+ ///
+ ///
+ /// This method follows the same behavior as described in .
+ /// Please visit its documentation for more details on this method.
+ ///
+ /// The snowflake identifier of the message.
+ /// The options to be used when sending the request.
+ ///
+ /// A task that represents an asynchronous get operation for retrieving the message. The task result contains
+ /// the retrieved message; null if no message is found with the specified identifier.
+ ///
public async Task GetMessageAsync(ulong id, RequestOptions options = null)
{
IMessage msg = _messages?.Get(id);
@@ -88,10 +101,51 @@ namespace Discord.WebSocket
msg = await ChannelHelper.GetMessageAsync(this, Discord, id, options).ConfigureAwait(false);
return msg;
}
+
+ ///
+ /// Gets the last N messages from this message channel.
+ ///
+ ///
+ /// This method follows the same behavior as described in .
+ /// Please visit its documentation for more details on this method.
+ ///
+ /// The numbers of message to be gotten from.
+ /// The options to be used when sending the request.
+ ///
+ /// Paged collection of messages.
+ ///
public IAsyncEnumerable> GetMessagesAsync(int limit = DiscordConfig.MaxMessagesPerBatch, RequestOptions options = null)
=> SocketChannelHelper.GetMessagesAsync(this, Discord, _messages, null, Direction.Before, limit, CacheMode.AllowDownload, options);
+ ///
+ /// Gets a collection of messages in this channel.
+ ///
+ ///
+ /// This method follows the same behavior as described in .
+ /// Please visit its documentation for more details on this method.
+ ///
+ /// The ID of the starting message to get the messages from.
+ /// The direction of the messages to be gotten from.
+ /// The numbers of message to be gotten from.
+ /// The options to be used when sending the request.
+ ///
+ /// Paged collection of messages.
+ ///
public IAsyncEnumerable> GetMessagesAsync(ulong fromMessageId, Direction dir, int limit = DiscordConfig.MaxMessagesPerBatch, RequestOptions options = null)
=> SocketChannelHelper.GetMessagesAsync(this, Discord, _messages, fromMessageId, dir, limit, CacheMode.AllowDownload, options);
+ ///
+ /// Gets a collection of messages in this channel.
+ ///
+ ///
+ /// This method follows the same behavior as described in .
+ /// Please visit its documentation for more details on this method.
+ ///
+ /// The starting message to get the messages from.
+ /// The direction of the messages to be gotten from.
+ /// The numbers of message to be gotten from.
+ /// The options to be used when sending the request.
+ ///
+ /// Paged collection of messages.
+ ///
public IAsyncEnumerable> GetMessagesAsync(IMessage fromMessage, Direction dir, int limit = DiscordConfig.MaxMessagesPerBatch, RequestOptions options = null)
=> SocketChannelHelper.GetMessagesAsync(this, Discord, _messages, fromMessage.Id, dir, limit, CacheMode.AllowDownload, options);
///
diff --git a/src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs
index 9fd7a244e..496b96d30 100644
--- a/src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs
+++ b/src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs
@@ -82,6 +82,10 @@ namespace Discord.WebSocket
///
/// Gets a message from this message channel.
///
+ ///
+ /// This method follows the same behavior as described in .
+ /// Please visit its documentation for more details on this method.
+ ///
/// The snowflake identifier of the message.
/// The options to be used when sending the request.
///
@@ -95,34 +99,14 @@ namespace Discord.WebSocket
msg = await ChannelHelper.GetMessageAsync(this, Discord, id, options).ConfigureAwait(false);
return msg;
}
+
///
/// Gets the last N messages from this message channel.
///
///
- ///
- /// The returned collection is an asynchronous enumerable object; one must call
- /// to access the individual messages as a
- /// collection.
- ///
- ///
- /// Do not fetch too many messages at once! This may cause unwanted preemptive rate limit or even actual
- /// rate limit, causing your bot to freeze!
- ///
- /// This method will attempt to fetch the number of messages specified under . The
- /// library will attempt to split up the requests according to your and
- /// . In other words, should the user request 500 messages,
- /// and the constant is 100, the request will
- /// be split into 5 individual requests; thus returning 5 individual asynchronous responses, hence the need
- /// of flattening.
+ /// This method follows the same behavior as described in .
+ /// Please visit its documentation for more details on this method.
///
- ///
- /// The following example downloads 300 messages and gets messages that belong to the user
- /// 53905483156684800.
- ///
- /// var messages = await messageChannel.GetMessagesAsync(300).FlattenAsync();
- /// var userMessages = messages.Where(x => x.Author.Id == 53905483156684800);
- ///
- ///
/// The numbers of message to be gotten from.
/// The options to be used when sending the request.
///
@@ -134,29 +118,9 @@ namespace Discord.WebSocket
/// Gets a collection of messages in this channel.
///
///
- ///
- /// The returned collection is an asynchronous enumerable object; one must call
- /// to access the individual messages as a
- /// collection.
- ///
- ///
- /// Do not fetch too many messages at once! This may cause unwanted preemptive rate limit or even actual
- /// rate limit, causing your bot to freeze!
- ///
- /// This method will attempt to fetch the number of messages specified under around
- /// the message depending on the . The library will
- /// attempt to split up the requests according to your and
- /// . In other words, should the user request 500 messages,
- /// and the constant is 100, the request will
- /// be split into 5 individual requests; thus returning 5 individual asynchronous responses, hence the need
- /// of flattening.
+ /// This method follows the same behavior as described in .
+ /// Please visit its documentation for more details on this method.
///
- ///
- /// The following example gets 5 message prior to the message identifier 442012544660537354.
- ///
- /// var messages = await channel.GetMessagesAsync(442012544660537354, Direction.Before, 5).FlattenAsync();
- ///
- ///
/// The ID of the starting message to get the messages from.
/// The direction of the messages to be gotten from.
/// The numbers of message to be gotten from.
@@ -170,29 +134,9 @@ namespace Discord.WebSocket
/// Gets a collection of messages in this channel.
///
///
- ///
- /// The returned collection is an asynchronous enumerable object; one must call
- /// to access the individual messages as a
- /// collection.
- ///
- ///
- /// Do not fetch too many messages at once! This may cause unwanted preemptive rate limit or even actual
- /// rate limit, causing your bot to freeze!
- ///
- /// This method will attempt to fetch the number of messages specified under around
- /// the message depending on the . The library will
- /// attempt to split up the requests according to your and
- /// . In other words, should the user request 500 messages,
- /// and the constant is 100, the request will
- /// be split into 5 individual requests; thus returning 5 individual asynchronous responses, hence the need
- /// of flattening.
+ /// This method follows the same behavior as described in .
+ /// Please visit its documentation for more details on this method.
///
- ///
- /// The following example gets 5 message prior to a specific message, oldMessage.
- ///
- /// var messages = await channel.GetMessagesAsync(oldMessage, Direction.Before, 5).FlattenAsync();
- ///
- ///
/// The starting message to get the messages from.
/// The direction of the messages to be gotten from.
/// The numbers of message to be gotten from.