Update ChannelHelper.cs (#606)

* Update ChannelHelper.cs

* typo
This commit is contained in:
Confruggy
2017-04-16 00:04:07 +02:00
committed by RogueException
parent 660d4b0bf6
commit 5dba95fe59

View File

@@ -91,6 +91,8 @@ namespace Discord.Rest
var guildId = (channel as IGuildChannel)?.GuildId;
var guild = guildId != null ? await (client as IDiscordClient).GetGuildAsync(guildId.Value, CacheMode.CacheOnly).ConfigureAwait(false) : null;
var model = await client.ApiClient.GetChannelMessageAsync(channel.Id, id, options).ConfigureAwait(false);
if (model == null)
return null;
var author = GetAuthor(client, guild, model.Author.Value, model.WebhookId.ToNullable());
return RestMessage.Create(client, channel, author, model);
}