Skip to content

Commit b276951

Browse files
authored
Update D.NET to 3.14.1 and MudBlazor to 6.19.1 (#1007)
1 parent 045decc commit b276951

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

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

1717
<PackageReference Update="Microsoft.EntityFrameworkCore" Version="8.0.0" />
1818
<PackageReference Update="Microsoft.EntityFrameworkCore.Design" Version="8.0.0"/>

Modix.Data/Models/Core/EphemeralUser.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ public class EphemeralUser : IGuildUser
9595

9696
public string? GlobalName { get; private set; }
9797

98+
public string? AvatarDecorationHash { get; private set; }
99+
100+
public ulong? AvatarDecorationSkuId { get; private set; }
101+
98102
public async Task AddRoleAsync(ulong roleId, RequestOptions? options = null)
99103
=> await OnGuildUserOrThrowAsync(user => user.AddRoleAsync(roleId, options));
100104

@@ -330,6 +334,12 @@ public EphemeralUser WithIGuildUserData(IGuildUser? user)
330334
if (user.TimedOutUntil != default)
331335
TimedOutUntil = user.TimedOutUntil;
332336

337+
if (user.AvatarDecorationHash != default)
338+
AvatarDecorationHash = user.AvatarDecorationHash;
339+
340+
if (user.AvatarDecorationSkuId != default)
341+
AvatarDecorationSkuId = user.AvatarDecorationSkuId;
342+
333343
return WithIUserData(user)
334344
.WithIVoiceStateData(user);
335345
}
@@ -416,6 +426,9 @@ private T OnGuildUserOrThrow<T>(Func<IGuildUser, T> action)
416426
return action.Invoke(_guildUser);
417427
}
418428

429+
public string GetAvatarDecorationUrl()
430+
=> $"{DiscordConfig.CDNUrl}avatar-decoration-presets/{AvatarDecorationHash}.png";
431+
419432
private IUser? _user;
420433
private IGuildUser? _guildUser;
421434
}

Modix.Web/Modix.Web.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<ItemGroup>
1111
<PackageReference Include="AspNet.Security.OAuth.Discord" />
1212
<PackageReference Include="Discord.Net" />
13-
<PackageReference Include="MudBlazor" Version="6.11.2" />
13+
<PackageReference Include="MudBlazor" Version="6.19.1" />
1414
<PackageReference Include="MudBlazor.Markdown" Version="0.1.3" />
1515
</ItemGroup>
1616

0 commit comments

Comments
 (0)