Skip to content

Commit

Permalink
Update D.NET to 3.14.1 and MudBlazor to 6.19.1 (#1007)
Browse files Browse the repository at this point in the history
  • Loading branch information
calledude authored Mar 26, 2024
1 parent 045decc commit b276951
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<!-- Package versions for package references across all projects -->
<ItemGroup>
<PackageReference Update="Discord.Net" Version="3.11.0" />
<PackageReference Update="Discord.Net" Version="3.14.1" />

<PackageReference Update="Microsoft.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Update="Microsoft.EntityFrameworkCore.Design" Version="8.0.0"/>
Expand Down
13 changes: 13 additions & 0 deletions Modix.Data/Models/Core/EphemeralUser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ public class EphemeralUser : IGuildUser

public string? GlobalName { get; private set; }

public string? AvatarDecorationHash { get; private set; }

public ulong? AvatarDecorationSkuId { get; private set; }

public async Task AddRoleAsync(ulong roleId, RequestOptions? options = null)
=> await OnGuildUserOrThrowAsync(user => user.AddRoleAsync(roleId, options));

Expand Down Expand Up @@ -330,6 +334,12 @@ public EphemeralUser WithIGuildUserData(IGuildUser? user)
if (user.TimedOutUntil != default)
TimedOutUntil = user.TimedOutUntil;

if (user.AvatarDecorationHash != default)
AvatarDecorationHash = user.AvatarDecorationHash;

if (user.AvatarDecorationSkuId != default)
AvatarDecorationSkuId = user.AvatarDecorationSkuId;

return WithIUserData(user)
.WithIVoiceStateData(user);
}
Expand Down Expand Up @@ -416,6 +426,9 @@ private T OnGuildUserOrThrow<T>(Func<IGuildUser, T> action)
return action.Invoke(_guildUser);
}

public string GetAvatarDecorationUrl()
=> $"{DiscordConfig.CDNUrl}avatar-decoration-presets/{AvatarDecorationHash}.png";

private IUser? _user;
private IGuildUser? _guildUser;
}
Expand Down
2 changes: 1 addition & 1 deletion Modix.Web/Modix.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<ItemGroup>
<PackageReference Include="AspNet.Security.OAuth.Discord" />
<PackageReference Include="Discord.Net" />
<PackageReference Include="MudBlazor" Version="6.11.2" />
<PackageReference Include="MudBlazor" Version="6.19.1" />
<PackageReference Include="MudBlazor.Markdown" Version="0.1.3" />
</ItemGroup>

Expand Down

0 comments on commit b276951

Please sign in to comment.