Added MessageType
This commit is contained in:
@@ -7,6 +7,8 @@ namespace Discord.API
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public ulong Id { get; set; }
|
||||
[JsonProperty("type")]
|
||||
public MessageType Type { get; set; }
|
||||
[JsonProperty("channel_id")]
|
||||
public ulong ChannelId { get; set; }
|
||||
[JsonProperty("author")]
|
||||
|
||||
@@ -18,6 +18,8 @@ namespace Discord
|
||||
/// <summary> Gets the time this message was sent. </summary>
|
||||
DateTimeOffset Timestamp { get; }
|
||||
|
||||
/// <summary> Gets the type of this message. </summary>
|
||||
MessageType Type { get; }
|
||||
/// <summary> Gets the channel this message was sent to. </summary>
|
||||
IMessageChannel Channel { get; }
|
||||
/// <summary> Gets the author of this message. </summary>
|
||||
|
||||
@@ -14,14 +14,15 @@ namespace Discord
|
||||
private bool _isMentioningEveryone;
|
||||
private long _timestampTicks;
|
||||
private long? _editedTimestampTicks;
|
||||
|
||||
public MessageType Type { get; }
|
||||
public IMessageChannel Channel { get; }
|
||||
public IUser Author { get; }
|
||||
|
||||
public bool IsTTS { get; private set; }
|
||||
public string Text { get; private set; }
|
||||
public bool IsPinned { get; private set; }
|
||||
|
||||
public IMessageChannel Channel { get; }
|
||||
public IUser Author { get; }
|
||||
|
||||
|
||||
public IReadOnlyCollection<IAttachment> Attachments { get; private set; }
|
||||
public IReadOnlyCollection<IEmbed> Embeds { get; private set; }
|
||||
public IReadOnlyCollection<ulong> MentionedChannelIds { get; private set; }
|
||||
@@ -37,6 +38,7 @@ namespace Discord
|
||||
{
|
||||
Channel = channel;
|
||||
Author = author;
|
||||
Type = model.Type;
|
||||
|
||||
if (channel is IGuildChannel)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Discord.API.Common
|
||||
namespace Discord
|
||||
{
|
||||
public enum MessageType
|
||||
{
|
||||
Reference in New Issue
Block a user