Fixed GUILD_MEMBER_REMOVE
This commit is contained in:
@@ -14,14 +14,15 @@ namespace Discord.API
|
||||
{
|
||||
[JsonProperty("user_id")]
|
||||
[JsonConverter(typeof(LongStringConverter))]
|
||||
public long UserId;
|
||||
public long UserId; //Used in bans
|
||||
|
||||
[JsonProperty("guild_id")]
|
||||
[JsonConverter(typeof(LongStringConverter))]
|
||||
public long GuildId;
|
||||
|
||||
[JsonProperty("user")]
|
||||
|
||||
private UserReference _user;
|
||||
public UserReference User
|
||||
[JsonProperty("user")]
|
||||
public UserReference User
|
||||
{
|
||||
get { return _user; }
|
||||
set
|
||||
|
||||
@@ -512,7 +512,7 @@ namespace Discord
|
||||
case "GUILD_MEMBER_REMOVE":
|
||||
{
|
||||
var data = e.Payload.ToObject<MemberRemoveEvent>(_webSocket.Serializer);
|
||||
var user = _users.TryRemove(data.UserId, data.GuildId);
|
||||
var user = _users.TryRemove(data.User.Id, data.GuildId);
|
||||
if (user != null)
|
||||
RaiseUserLeft(user);
|
||||
}
|
||||
|
||||
@@ -98,7 +98,6 @@ namespace Discord
|
||||
public int WebSocketInterval { get { return _webSocketInterval; } set { SetValue(ref _webSocketInterval, value); } }
|
||||
private int _webSocketInterval = 100;
|
||||
|
||||
|
||||
//Performance
|
||||
|
||||
/// <summary> Instructs Discord to not send send information about offline users, for servers with more than 50 users. </summary>
|
||||
|
||||
Reference in New Issue
Block a user