Browse Source

Simplify convert to IEmote

pull/1544/head
Paulo 5 years ago
parent
commit
09d89f1eb3
1 changed files with 1 additions and 6 deletions
  1. +1
    -6
      src/Discord.Net.WebSocket/DiscordSocketClient.cs

+ 1
- 6
src/Discord.Net.WebSocket/DiscordSocketClient.cs View File

@@ -1406,12 +1406,7 @@ namespace Discord.WebSocket
: Optional.Create(cachedMsg);

var cacheable = new Cacheable<IUserMessage, ulong>(cachedMsg, data.MessageId, isCached, async () => await channel.GetMessageAsync(data.MessageId).ConfigureAwait(false) as IUserMessage);

IEmote emote;
if (data.Emoji.Id.HasValue)
emote = new Emote(data.Emoji.Id.Value, data.Emoji.Name, data.Emoji.Animated.GetValueOrDefault());
else
emote = new Emoji(data.Emoji.Name);
var emote = data.Emoji.ToIEmote();

cachedMsg?.RemoveAllReactionsForEmoteAsync(emote);



Loading…
Cancel
Save