Browse Source

Fixed Optional argument in Message Updated event

pull/271/head
Kwoth 8 years ago
parent
commit
d2b37c38d6
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      src/Discord.Net/WebSocket/DiscordSocketClient.cs

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

@@ -1262,7 +1262,10 @@ namespace Discord.WebSocket
after = channel.CreateMessage(author, data);
}
if (after != null)
await _messageUpdatedEvent.InvokeAsync(Optional.Create(before), after).ConfigureAwait(false);
if (before == null)
await _messageUpdatedEvent.InvokeAsync(Optional.Create<IMessage>(), after).ConfigureAwait(false);
else
await _messageUpdatedEvent.InvokeAsync(Optional.Create<IMessage>(before), after).ConfigureAwait(false);
}
else
{


Loading…
Cancel
Save