[Fix] Certain global user properies not getting updated (#3158)
* yep * fix
This commit is contained in:
50
.gitignore
vendored
50
.gitignore
vendored
@@ -206,3 +206,53 @@ docs/api/\.manifest
|
|||||||
|
|
||||||
# Codealike UID
|
# Codealike UID
|
||||||
codealike.json
|
codealike.json
|
||||||
|
WebhookEventsApp/WebhookEventsApp.csproj
|
||||||
|
WebhookEventsApp/Properties/launchSettings.json
|
||||||
|
WebhookEventsApp/Program.cs
|
||||||
|
WebhookEventsApp/Modules/TestModule.cs
|
||||||
|
WebhookEventsApp/Interaction.cs
|
||||||
|
WebhookEventsApp/AspNetCoreInteractions.cs
|
||||||
|
WebhookEventsApp/appsettings.json
|
||||||
|
WebhookEventsApp/appsettings.Development.json
|
||||||
|
VoiceFuckery/VoiceFuckery.csproj
|
||||||
|
VoiceFuckery/Program.cs
|
||||||
|
VoiceFuckery/opus.dll
|
||||||
|
VoiceFuckery/libsodium.dll
|
||||||
|
VoiceFuckery/bees.mp3
|
||||||
|
ShardFuckery/ShardFuckery.csproj
|
||||||
|
ShardFuckery/Program.cs
|
||||||
|
RestInteractionsTestBot/RestInteractionsTestBot.csproj
|
||||||
|
RestInteractionsTestBot/Properties/launchSettings.json
|
||||||
|
RestInteractionsTestBot/Program.cs
|
||||||
|
RestInteractionsTestBot/Modules/TestModule.cs
|
||||||
|
RestInteractionsTestBot/BotService.cs
|
||||||
|
RestInteractionsTestBot/AspNetCoreInteractions.cs
|
||||||
|
RestInteractionsTestBot/appsettings.json
|
||||||
|
RestInteractionsTestBot/appsettings.Development.json
|
||||||
|
DNetTestApp/Program.cs
|
||||||
|
DNetTestApp/DNetTestApp.csproj
|
||||||
|
DNetRestIntFramework/Program.cs
|
||||||
|
DNetRestIntFramework/DNetRestIntFramework.csproj
|
||||||
|
DNetRestIntFramework/BotService.cs
|
||||||
|
DiscordNetTestBot/Startup.cs
|
||||||
|
DiscordNetTestBot/Properties/CommandLocalizations.ru.resx
|
||||||
|
DiscordNetTestBot/Properties/CommandLocalizations.resx
|
||||||
|
DiscordNetTestBot/Properties/CommandLocalizations.Designer.cs
|
||||||
|
DiscordNetTestBot/Modules/TestModule.cs
|
||||||
|
DiscordNetTestBot/Modules/MoreModules.cs
|
||||||
|
DiscordNetTestBot/Modules/CringeAutocomplete.cs
|
||||||
|
DiscordNetTestBot/Modules/CommandModule.cs
|
||||||
|
DiscordNetTestBot/Modules/AnotherModule.cs
|
||||||
|
DiscordNetTestBot/InteractionHandler.cs
|
||||||
|
DiscordNetTestBot/DiscordNetTestBot.csproj
|
||||||
|
DiscordNetTestBot/DiscordBot.cs
|
||||||
|
DiscordNetTestBot/appsettings.json
|
||||||
|
DiscordNetTestBot/DiscordNetTemplate.csproj
|
||||||
|
DiscordNetTestBot/Services/DiscordBotService.cs
|
||||||
|
DiscordNetTestBot/Services/InteractionHandler.cs
|
||||||
|
DiscordNetTestBot/Modules/ModalValueDebug.cs
|
||||||
|
DiscordNetTestBot/Modules/ComponentsDebug.cs
|
||||||
|
ShardedFun/ShardedFun.csproj
|
||||||
|
ShardedFun/Program.cs
|
||||||
|
DiscordNetTestBot/Services/TetrisService.cs
|
||||||
|
DiscordNetTestBot/Modules/TetrisModule.cs
|
||||||
|
|||||||
@@ -8,14 +8,27 @@ namespace Discord.WebSocket
|
|||||||
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
|
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
|
||||||
internal class SocketGlobalUser : SocketUser
|
internal class SocketGlobalUser : SocketUser
|
||||||
{
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
public override bool IsBot { get; internal set; }
|
public override bool IsBot { get; internal set; }
|
||||||
|
/// <inheritdoc />
|
||||||
public override string Username { get; internal set; }
|
public override string Username { get; internal set; }
|
||||||
|
/// <inheritdoc />
|
||||||
public override ushort DiscriminatorValue { get; internal set; }
|
public override ushort DiscriminatorValue { get; internal set; }
|
||||||
|
/// <inheritdoc />
|
||||||
public override string AvatarId { get; internal set; }
|
public override string AvatarId { get; internal set; }
|
||||||
|
/// <inheritdoc />
|
||||||
public override string GlobalName { get; internal set; }
|
public override string GlobalName { get; internal set; }
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override string AvatarDecorationHash { get; internal set; }
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override ulong? AvatarDecorationSkuId { get; internal set; }
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override PrimaryGuild? PrimaryGuild { get; internal set; }
|
||||||
|
/// <inheritdoc />
|
||||||
internal override SocketPresence Presence { get; set; }
|
internal override SocketPresence Presence { get; set; }
|
||||||
|
/// <inheritdoc />
|
||||||
public override bool IsWebhook => false;
|
public override bool IsWebhook => false;
|
||||||
|
/// <inheritdoc />
|
||||||
internal override SocketGlobalUser GlobalUser { get => this; set => throw new NotImplementedException(); }
|
internal override SocketGlobalUser GlobalUser { get => this; set => throw new NotImplementedException(); }
|
||||||
|
|
||||||
private readonly object _lockObj = new object();
|
private readonly object _lockObj = new object();
|
||||||
|
|||||||
@@ -31,6 +31,28 @@ namespace Discord.WebSocket
|
|||||||
public override string AvatarId { get { return GlobalUser.AvatarId; } internal set { GlobalUser.AvatarId = value; } }
|
public override string AvatarId { get { return GlobalUser.AvatarId; } internal set { GlobalUser.AvatarId = value; } }
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override string GlobalName { get { return GlobalUser.GlobalName; } internal set { GlobalUser.GlobalName = value; } }
|
public override string GlobalName { get { return GlobalUser.GlobalName; } internal set { GlobalUser.GlobalName = value; } }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override string AvatarDecorationHash
|
||||||
|
{
|
||||||
|
get => GlobalUser.AvatarDecorationHash;
|
||||||
|
internal set => GlobalUser.AvatarDecorationHash = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override ulong? AvatarDecorationSkuId
|
||||||
|
{
|
||||||
|
get => GlobalUser.AvatarDecorationSkuId;
|
||||||
|
internal set => GlobalUser.AvatarDecorationSkuId = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override PrimaryGuild? PrimaryGuild
|
||||||
|
{
|
||||||
|
get => GlobalUser.PrimaryGuild;
|
||||||
|
internal set => GlobalUser.PrimaryGuild = value;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
internal override SocketPresence Presence { get { return GlobalUser.Presence; } set { GlobalUser.Presence = value; } }
|
internal override SocketPresence Presence { get { return GlobalUser.Presence; } set { GlobalUser.Presence = value; } }
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,13 @@ namespace Discord.WebSocket
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override string GlobalName { get { return GlobalUser.GlobalName; } internal set { GlobalUser.GlobalName = value; } }
|
public override string GlobalName { get { return GlobalUser.GlobalName; } internal set { GlobalUser.GlobalName = value; } }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override string AvatarDecorationHash { get => GlobalUser.AvatarDecorationHash; internal set => GlobalUser.AvatarDecorationHash = value; }
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override ulong? AvatarDecorationSkuId { get => GlobalUser.AvatarDecorationSkuId; internal set => GlobalUser.AvatarDecorationSkuId = value; }
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override PrimaryGuild? PrimaryGuild { get => GlobalUser.PrimaryGuild; internal set => GlobalUser.PrimaryGuild = value; }
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public string GuildBannerHash { get; private set; }
|
public string GuildBannerHash { get; private set; }
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,28 @@ namespace Discord.WebSocket
|
|||||||
public override string AvatarId { get { return GlobalUser.AvatarId; } internal set { GlobalUser.AvatarId = value; } }
|
public override string AvatarId { get { return GlobalUser.AvatarId; } internal set { GlobalUser.AvatarId = value; } }
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override string GlobalName { get { return GlobalUser.GlobalName; } internal set { GlobalUser.GlobalName = value; } }
|
public override string GlobalName { get { return GlobalUser.GlobalName; } internal set { GlobalUser.GlobalName = value; } }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override string AvatarDecorationHash
|
||||||
|
{
|
||||||
|
get => GlobalUser.AvatarDecorationHash;
|
||||||
|
internal set => GlobalUser.AvatarDecorationHash = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override ulong? AvatarDecorationSkuId
|
||||||
|
{
|
||||||
|
get => GlobalUser.AvatarDecorationSkuId;
|
||||||
|
internal set => GlobalUser.AvatarDecorationSkuId = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override PrimaryGuild? PrimaryGuild
|
||||||
|
{
|
||||||
|
get => GlobalUser.PrimaryGuild;
|
||||||
|
internal set => GlobalUser.PrimaryGuild = value;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
internal override SocketPresence Presence { get { return GlobalUser.Presence; } set { GlobalUser.Presence = value; } }
|
internal override SocketPresence Presence { get { return GlobalUser.Presence; } set { GlobalUser.Presence = value; } }
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|||||||
@@ -65,6 +65,28 @@ namespace Discord.WebSocket
|
|||||||
get => GlobalUser.GlobalName;
|
get => GlobalUser.GlobalName;
|
||||||
internal set => GlobalUser.GlobalName = value;
|
internal set => GlobalUser.GlobalName = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override string AvatarDecorationHash
|
||||||
|
{
|
||||||
|
get => GlobalUser.AvatarDecorationHash;
|
||||||
|
internal set => GlobalUser.AvatarDecorationHash = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override ulong? AvatarDecorationSkuId
|
||||||
|
{
|
||||||
|
get => GlobalUser.AvatarDecorationSkuId;
|
||||||
|
internal set => GlobalUser.AvatarDecorationSkuId = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override PrimaryGuild? PrimaryGuild
|
||||||
|
{
|
||||||
|
get => GlobalUser.PrimaryGuild;
|
||||||
|
internal set => GlobalUser.PrimaryGuild = value;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public string DisplayAvatarId => GuildAvatarId ?? AvatarId;
|
public string DisplayAvatarId => GuildAvatarId ?? AvatarId;
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,12 @@ namespace Discord.WebSocket
|
|||||||
public override string AvatarId { get; internal set; }
|
public override string AvatarId { get; internal set; }
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override string GlobalName { get; internal set; }
|
public override string GlobalName { get; internal set; }
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override string AvatarDecorationHash { get; internal set; }
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override ulong? AvatarDecorationSkuId { get; internal set; }
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override PrimaryGuild? PrimaryGuild { get; internal set; }
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override bool IsBot { get; internal set; }
|
public override bool IsBot { get; internal set; }
|
||||||
|
|||||||
@@ -49,10 +49,13 @@ namespace Discord.WebSocket
|
|||||||
public IReadOnlyCollection<IActivity> Activities => Presence.Activities ?? ImmutableList<IActivity>.Empty;
|
public IReadOnlyCollection<IActivity> Activities => Presence.Activities ?? ImmutableList<IActivity>.Empty;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public string AvatarDecorationHash { get; private set; }
|
public abstract string AvatarDecorationHash { get; internal set; }
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public ulong? AvatarDecorationSkuId { get; private set; }
|
public abstract ulong? AvatarDecorationSkuId { get; internal set; }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public abstract PrimaryGuild? PrimaryGuild { get; internal set; }
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public PrimaryGuild? PrimaryGuild { get; private set; }
|
public PrimaryGuild? PrimaryGuild { get; private set; }
|
||||||
@@ -120,15 +123,15 @@ namespace Discord.WebSocket
|
|||||||
{
|
{
|
||||||
if (model.PrimaryGuild.Value is null)
|
if (model.PrimaryGuild.Value is null)
|
||||||
{
|
{
|
||||||
PrimaryGuild = null;
|
|
||||||
if (PrimaryGuild is not null)
|
if (PrimaryGuild is not null)
|
||||||
hasChanges = true;
|
hasChanges = true;
|
||||||
|
PrimaryGuild = null;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (PrimaryGuild?.GuildId != model.PrimaryGuild.Value.GuildId ||
|
if (PrimaryGuild?.GuildId != model.PrimaryGuild.Value.GuildId ||
|
||||||
PrimaryGuild?.BadgeHash != model.PrimaryGuild.Value.BadgeHash ||
|
PrimaryGuild?.BadgeHash != model.PrimaryGuild.Value.BadgeHash ||
|
||||||
PrimaryGuild?.Tag != model.PrimaryGuild.Value.Tag||
|
PrimaryGuild?.Tag != model.PrimaryGuild.Value.Tag ||
|
||||||
PrimaryGuild?.IdentityEnabled != model.PrimaryGuild.Value.IdentityEnabled)
|
PrimaryGuild?.IdentityEnabled != model.PrimaryGuild.Value.IdentityEnabled)
|
||||||
{
|
{
|
||||||
PrimaryGuild = new(
|
PrimaryGuild = new(
|
||||||
|
|||||||
@@ -28,6 +28,15 @@ namespace Discord.WebSocket
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override string GlobalName { get; internal set; }
|
public override string GlobalName { get; internal set; }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override string AvatarDecorationHash { get; internal set; }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override ulong? AvatarDecorationSkuId { get; internal set; }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override PrimaryGuild? PrimaryGuild { get; internal set; }
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override bool IsBot { get; internal set; }
|
public override bool IsBot { get; internal set; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user