Complies with the new MessageType property on API v6pull/124/head
| @@ -9,6 +9,8 @@ namespace Discord.API | |||||
| public ulong Id { get; set; } | public ulong Id { get; set; } | ||||
| [JsonProperty("channel_id")] | [JsonProperty("channel_id")] | ||||
| public ulong ChannelId { get; set; } | public ulong ChannelId { get; set; } | ||||
| [JsonProperty("type")] | |||||
| public MessageType Type { get; set; } | |||||
| [JsonProperty("author")] | [JsonProperty("author")] | ||||
| public Optional<User> Author { get; set; } | public Optional<User> Author { get; set; } | ||||
| [JsonProperty("content")] | [JsonProperty("content")] | ||||
| @@ -17,6 +17,8 @@ namespace Discord | |||||
| string Text { get; } | string Text { get; } | ||||
| /// <summary> Gets the time this message was sent. </summary> | /// <summary> Gets the time this message was sent. </summary> | ||||
| DateTimeOffset Timestamp { get; } | DateTimeOffset Timestamp { get; } | ||||
| /// <summary> Gets the type of message this is. Value will always be default, unless the message was sent in a group. </summary> | |||||
| MessageType Type { get; } | |||||
| /// <summary> Gets the channel this message was sent to. </summary> | /// <summary> Gets the channel this message was sent to. </summary> | ||||
| IMessageChannel Channel { get; } | IMessageChannel Channel { get; } | ||||
| @@ -18,6 +18,7 @@ namespace Discord | |||||
| public bool IsTTS { get; private set; } | public bool IsTTS { get; private set; } | ||||
| public string Text { get; private set; } | public string Text { get; private set; } | ||||
| public bool IsPinned { get; private set; } | public bool IsPinned { get; private set; } | ||||
| public MessageType Type { get; private set; } | |||||
| public IMessageChannel Channel { get; } | public IMessageChannel Channel { get; } | ||||
| public IUser Author { get; } | public IUser Author { get; } | ||||
| @@ -0,0 +1,17 @@ | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Linq; | |||||
| using System.Threading.Tasks; | |||||
| namespace Discord | |||||
| { | |||||
| public enum MessageType | |||||
| { | |||||
| Default = 0, | |||||
| RecipientAdd = 1, | |||||
| RecipientRemove = 2, | |||||
| Call = 3, | |||||
| NameChange = 4, | |||||
| IconChange = 5 | |||||
| } | |||||
| } | |||||