Browse Source

Update ChannelHelper.cs (#606)

* Update ChannelHelper.cs

* typo
tags/1.0.0-rc2
Confruggy RogueException 8 years ago
parent
commit
5dba95fe59
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs

+ 2
- 0
src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs 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);
}


Loading…
Cancel
Save