Class Attachment
- Namespace
- Discord
- Assembly
- Discord.Net.Rest.dll
Represents a message attachment found in a IUserMessage.
public class Attachment : IAttachment, ISnowflakeEntity, IEntity<ulong>
- Inheritance
-
Attachment
- Implements
- Inherited Members
- Extension Methods
Properties
ClipCreatedAt
Gets the timestamp of the clip. null if the attachment is not a clip.
public DateTimeOffset? ClipCreatedAt { get; }
Property Value
ClipParticipants
Gets users who participated in the clip.
public IReadOnlyCollection<RestUser> ClipParticipants { get; }
Property Value
ContentType
public string ContentType { get; }
Property Value
CreatedAt
Gets when the snowflake was created.
public DateTimeOffset CreatedAt { get; }
Property Value
- DateTimeOffset
A DateTimeOffset representing when the entity was first created.
Description
Gets the description of the attachment; or null if there is none set.
public string Description { get; }
Property Value
Duration
Gets the duration of the audio file. null if the attachment is not a voice message.
public double? Duration { get; }
Property Value
Ephemeral
Gets whether or not this attachment is ephemeral.
public bool Ephemeral { get; }
Property Value
Filename
Gets the filename of this attachment.
public string Filename { get; }
Property Value
- string
A string containing the full filename of this attachment (e.g.
textFile.txt
).
Flags
Gets flags related to this to this attachment.
public AttachmentFlags Flags { get; }
Property Value
Height
Gets the height of this attachment.
public int? Height { get; }
Property Value
Id
Gets the unique identifier for this object.
public ulong Id { get; }
Property Value
ProxyUrl
Gets a proxied URL of this attachment.
public string ProxyUrl { get; }
Property Value
- string
A string containing the proxied URL of this attachment.
Size
Gets the file size of this attachment.
public int Size { get; }
Property Value
- int
The size of this attachment in bytes.
Title
Gets the title of the clip. null if the clip has no title set.
public string Title { get; }
Property Value
Url
Gets the URL of this attachment.
public string Url { get; }
Property Value
- string
A string containing the URL of this attachment.
Waveform
Gets the base64 encoded bytearray representing a sampled waveform. null if the attachment is not a voice message.
public string Waveform { get; }
Property Value
WaveformBytes
Gets the bytearray representing a sampled waveform. null if the attachment is not a voice message.
public byte[] WaveformBytes { get; }
Property Value
- byte[]
Width
Gets the width of this attachment.
public int? Width { get; }
Property Value
Methods
ToString()
Returns the filename of this attachment.
public override string ToString()
Returns
- string
A string containing the filename of this attachment.