Changed IMessage.ChannelId to IMessage.Channel

This commit is contained in:
RogueException
2016-10-07 19:07:22 -03:00
parent 007b4b11f0
commit c28751f631
7 changed files with 126 additions and 16 deletions

View File

@@ -30,13 +30,15 @@ namespace Discord.Rest
public override IReadOnlyCollection<RestUser> MentionedUsers => MessageHelper.FilterTagsByValue<RestUser>(TagType.UserMention, _tags);
public override IReadOnlyCollection<ITag> Tags => _tags;
internal RestUserMessage(BaseDiscordClient discord, ulong id, ulong channelId, RestUser author, IGuild guild)
: base(discord, id, channelId, author, guild)
internal RestUserMessage(BaseDiscordClient discord, ulong id, IMessageChannel channel, RestUser author, IGuild guild)
: base(discord, id, channel, author, guild)
{
}
internal new static RestUserMessage Create(BaseDiscordClient discord, IGuild guild, Model model)
{
var entity = new RestUserMessage(discord, model.Id, model.ChannelId, RestUser.Create(discord, model.Author.Value), guild);
var entity = new RestUserMessage(discord, model.Id,
RestVirtualMessageChannel.Create(discord, model.ChannelId),
RestUser.Create(discord, model.Author.Value), guild);
entity.Update(model);
return entity;
}