Browse Source

Streamline docs for Attachment

+ This commit also adds further explanation for why Embeds and Attachments are read-only collections
pull/1218/head
Still Hsu 6 years ago
parent
commit
5413587542
No known key found for this signature in database GPG Key ID: 8601A145FDA95209
3 changed files with 12 additions and 4 deletions
  1. +1
    -1
      src/Discord.Net.Core/Entities/Messages/IAttachment.cs
  2. +10
    -0
      src/Discord.Net.Core/Entities/Messages/IMessage.cs
  3. +1
    -3
      src/Discord.Net.Rest/Entities/Messages/Attachment.cs

+ 1
- 1
src/Discord.Net.Core/Entities/Messages/IAttachment.cs View File

@@ -1,7 +1,7 @@
namespace Discord namespace Discord
{ {
/// <summary> /// <summary>
/// Represents a Discord attachment.
/// Represents a message attachment found in a <see cref="IUserMessage"/>.
/// </summary> /// </summary>
public interface IAttachment public interface IAttachment
{ {


+ 10
- 0
src/Discord.Net.Core/Entities/Messages/IMessage.cs View File

@@ -64,6 +64,11 @@ namespace Discord
/// <summary> /// <summary>
/// Gets all attachments included in this message. /// Gets all attachments included in this message.
/// </summary> /// </summary>
/// <remarks>
/// This property gets a read-only collection of attachments associated with this message. Depending on the
/// user's end-client, a sent message may contain one or more attachments. For example, mobile users may
/// attach more than one file in their message, while the desktop client only allows for one.
/// </remarks>
/// <returns> /// <returns>
/// A read-only collection of attachments. /// A read-only collection of attachments.
/// </returns> /// </returns>
@@ -71,6 +76,11 @@ namespace Discord
/// <summary> /// <summary>
/// Gets all embeds included in this message. /// Gets all embeds included in this message.
/// </summary> /// </summary>
/// <remarks>
/// </remarks>
/// This property gets a read-only collection of embeds associated with this message. Depending on the
/// message, a sent message may contain one or more embeds. This is usually true when multiple link previews
/// are generated; however, only one <see cref="EmbedType.Rich"/> <see cref="Embed"/> can be featured.
/// <returns> /// <returns>
/// A read-only collection of embed objects. /// A read-only collection of embed objects.
/// </returns> /// </returns>


+ 1
- 3
src/Discord.Net.Rest/Entities/Messages/Attachment.cs View File

@@ -3,9 +3,7 @@ using Model = Discord.API.Attachment;


namespace Discord namespace Discord
{ {
/// <summary>
/// An attachment file seen in a <see cref="IUserMessage"/>.
/// </summary>
/// <inheritdoc/>
[DebuggerDisplay(@"{DebuggerDisplay,nq}")] [DebuggerDisplay(@"{DebuggerDisplay,nq}")]
public class Attachment : IAttachment public class Attachment : IAttachment
{ {


Loading…
Cancel
Save