Browse Source

Set message Id after queued send succeeds

tags/docs-0.9
RogueException 9 years ago
parent
commit
6fdd6b10de
2 changed files with 2 additions and 1 deletions
  1. +1
    -0
      src/Discord.Net/MessageQueue.cs
  2. +1
    -1
      src/Discord.Net/Models/Message.cs

+ 1
- 0
src/Discord.Net/MessageQueue.cs View File

@@ -136,6 +136,7 @@ namespace Discord.Net
IsTTS = msg.IsTTS
};
var response = await _client.ClientAPI.Send(request).ConfigureAwait(false);
msg.Id = response.Id;
msg.Update(response);
msg.State = MessageState.Normal;
}


+ 1
- 1
src/Discord.Net/Models/Message.cs View File

@@ -171,7 +171,7 @@ namespace Discord
internal DiscordClient Client => Channel.Client;

/// <summary> Returns the unique identifier for this message. </summary>
public ulong Id { get; }
public ulong Id { get; internal set; }
/// <summary> Returns the channel this message was sent to. </summary>
public Channel Channel { get; }
/// <summary> Returns the author of this message. </summary>


Loading…
Cancel
Save