[Fix] Updated global name not being passed to UserUpdated event (#2726)
* fix * fix another overgisht
This commit is contained in:
@@ -12,6 +12,7 @@ namespace Discord.WebSocket
|
||||
public override string Username { get; internal set; }
|
||||
public override ushort DiscriminatorValue { get; internal set; }
|
||||
public override string AvatarId { get; internal set; }
|
||||
public override string GlobalName { get; internal set; }
|
||||
internal override SocketPresence Presence { get; set; }
|
||||
|
||||
public override bool IsWebhook => false;
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace Discord.WebSocket
|
||||
/// <inheritdoc />
|
||||
public override string AvatarId { get { return GlobalUser.AvatarId; } internal set { GlobalUser.AvatarId = value; } }
|
||||
/// <inheritdoc />
|
||||
public override string GlobalName { get { return GlobalUser.GlobalName; } internal set { GlobalUser.GlobalName = value; } }
|
||||
/// <inheritdoc />
|
||||
internal override SocketPresence Presence { get { return GlobalUser.Presence; } set { GlobalUser.Presence = value; } }
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -47,6 +47,8 @@ namespace Discord.WebSocket
|
||||
public override ushort DiscriminatorValue { get { return GlobalUser.DiscriminatorValue; } internal set { GlobalUser.DiscriminatorValue = value; } }
|
||||
/// <inheritdoc />
|
||||
public override string AvatarId { get { return GlobalUser.AvatarId; } internal set { GlobalUser.AvatarId = value; } }
|
||||
/// <inheritdoc />
|
||||
public override string GlobalName { get { return GlobalUser.GlobalName; } internal set { GlobalUser.GlobalName = value; } }
|
||||
|
||||
/// <inheritdoc />
|
||||
public GuildPermissions GuildPermissions => new GuildPermissions(Permissions.ResolveGuild(Guild, this));
|
||||
|
||||
@@ -29,6 +29,8 @@ namespace Discord.WebSocket
|
||||
/// <inheritdoc />
|
||||
public override string AvatarId { get { return GlobalUser.AvatarId; } internal set { GlobalUser.AvatarId = value; } }
|
||||
/// <inheritdoc />
|
||||
public override string GlobalName { get { return GlobalUser.GlobalName; } internal set { GlobalUser.GlobalName = value; } }
|
||||
/// <inheritdoc />
|
||||
internal override SocketPresence Presence { get { return GlobalUser.Presence; } set { GlobalUser.Presence = value; } }
|
||||
/// <inheritdoc />
|
||||
public UserProperties Flags { get; internal set; }
|
||||
|
||||
@@ -58,6 +58,13 @@ namespace Discord.WebSocket
|
||||
get => GuildUser.AvatarId;
|
||||
internal set => GuildUser.AvatarId = value;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string GlobalName
|
||||
{
|
||||
get => GlobalUser.GlobalName;
|
||||
internal set => GlobalUser.GlobalName = value;
|
||||
}
|
||||
/// <inheritdoc/>
|
||||
public string DisplayAvatarId => GuildAvatarId ?? AvatarId;
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ namespace Discord.WebSocket
|
||||
public override ushort DiscriminatorValue { get; internal set; }
|
||||
/// <inheritdoc />
|
||||
public override string AvatarId { get; internal set; }
|
||||
/// <inheritdoc />
|
||||
public override string GlobalName { get; internal set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool IsBot { get; internal set; }
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Discord.WebSocket
|
||||
internal abstract SocketPresence Presence { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string GlobalName { get; internal set; }
|
||||
public abstract string GlobalName { get; internal set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id);
|
||||
@@ -93,7 +93,7 @@ namespace Discord.WebSocket
|
||||
PublicFlags = model.PublicFlags.Value;
|
||||
hasChanges = true;
|
||||
}
|
||||
if (model.GlobalName.IsSpecified)
|
||||
if (model.GlobalName.IsSpecified && model.GlobalName.Value != GlobalName)
|
||||
{
|
||||
GlobalName = model.GlobalName.Value;
|
||||
hasChanges = true;
|
||||
|
||||
@@ -25,7 +25,8 @@ namespace Discord.WebSocket
|
||||
public override ushort DiscriminatorValue { get; internal set; }
|
||||
/// <inheritdoc />
|
||||
public override string AvatarId { get; internal set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string GlobalName { get; internal set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool IsBot { get; internal set; }
|
||||
|
||||
Reference in New Issue
Block a user