Added WebhookId/IsWebhook to IMessage

This commit is contained in:
RogueException
2016-10-07 18:28:39 -03:00
parent 95a8f36d63
commit 007b4b11f0
5 changed files with 15 additions and 13 deletions

View File

@@ -14,17 +14,15 @@ namespace Discord.WebSocket
{
private bool _isMentioningEveryone, _isTTS, _isPinned;
private long? _editedTimestampTicks;
private ulong? _webhookId;
private ImmutableArray<Attachment> _attachments;
private ImmutableArray<Embed> _embeds;
private ImmutableArray<ITag> _tags;
public ulong? WebhookId { get; private set; }
public override bool IsTTS => _isTTS;
public override bool IsPinned => _isPinned;
public override bool IsWebhook => WebhookId != null;
public override ulong? WebhookId => _webhookId;
public override DateTimeOffset? EditedTimestamp => DateTimeUtils.FromTicks(_editedTimestampTicks);
public override IReadOnlyCollection<Attachment> Attachments => _attachments;
public override IReadOnlyCollection<Embed> Embeds => _embeds;
public override IReadOnlyCollection<ITag> Tags => _tags;
@@ -56,7 +54,7 @@ namespace Discord.WebSocket
if (model.MentionEveryone.IsSpecified)
_isMentioningEveryone = model.MentionEveryone.Value;
if (model.WebhookId.IsSpecified)
WebhookId = model.WebhookId.Value;
_webhookId = model.WebhookId.Value;
if (model.Attachments.IsSpecified)
{