Skip to content

Commit 598f794

Browse files
Update dependencies
Latest deps for .net 9 + any fixes needed to squash errors that came up as a result
1 parent f263daa commit 598f794

9 files changed

Lines changed: 36 additions & 33 deletions

File tree

Administrator.Bot/Administrator.Bot.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
</PropertyGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="AWSSDK.S3" Version="4.0.13.1" />
16+
<PackageReference Include="AWSSDK.S3" Version="4.0.18.2" />
1717
<PackageReference Include="Backpack.Net" Version="2.0.1" />
1818
<PackageReference Include="Chronic.Core" Version="0.4.0" />
19-
<PackageReference Include="Disqord.Bot" Version="1.0.0-alpha5.91" />
19+
<PackageReference Include="Disqord.Bot" Version="1.0.0-alpha5.101" />
2020
<PackageReference Include="Laylua" Version="1.0.0" />
21-
<PackageReference Include="Magick.NET-Q16-x64" Version="14.10.1" />
21+
<PackageReference Include="Magick.NET-Q16-x64" Version="14.10.2" />
2222
<PackageReference Include="MimeTypes" Version="2.5.2">
2323
<PrivateAssets>all</PrivateAssets>
2424
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2525
</PackageReference>
26-
<PackageReference Include="Quartz" Version="4.0.0-preview-20250201-1850" />
26+
<PackageReference Include="Quartz" Version="4.0.0-preview-20260124-0807" />
2727
<PackageReference Include="SteamWebAPI2" Version="5.0.0" />
2828
<PackageReference Include="Svg" Version="3.4.7" />
2929
</ItemGroup>

Administrator.Bot/Modules/Impl/ForumAutoTagModule.Impl.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using Disqord.Bot.Commands.Application;
55
using Disqord.Gateway;
66
using LinqToDB;
7+
using LinqToDB.EntityFrameworkCore;
78
using Qmmands;
89

910
namespace Administrator.Bot;
@@ -16,7 +17,7 @@ public partial async Task<IResult> Add(IChannel channel, string text, string tag
1617
if (forum?.Tags.FirstOrDefault(x => x.Id.ToString() == tag || x.Name == tag) is not { } forumTag)
1718
return Response($"No valid tag could be found in the forum {Mention.Channel(channel.Id)} with the input \"{tag}\".").AsEphemeral();
1819

19-
if (await db.AutoTags.FirstOrDefaultAsync(x => x.Text == text && x.ChannelId == channel.Id && x.GuildId == Context.GuildId) is { } existingAutoTag)
20+
if (await db.AutoTags.FirstOrDefaultAsyncEF(x => x.Text == text && x.ChannelId == channel.Id && x.GuildId == Context.GuildId) is { } existingAutoTag)
2021
return Response($"Existing automatic tag {existingAutoTag} already matches the same text and forum channel!").AsEphemeral();
2122

2223
ForumAutoTag autoTag;
@@ -42,7 +43,7 @@ public partial async Task<IResult> Add(IChannel channel, string text, string tag
4243

4344
public partial async Task<IResult> Remove(int autoTagId)
4445
{
45-
if (await db.AutoTags.FirstOrDefaultAsync(x => x.Id == autoTagId && x.GuildId == Context.GuildId) is not { } autoTag)
46+
if (await db.AutoTags.FirstOrDefaultAsyncEF(x => x.Id == autoTagId && x.GuildId == Context.GuildId) is not { } autoTag)
4647
return Response("No automatic tag could be found with that ID.").AsEphemeral();
4748

4849
db.AutoTags.Remove(autoTag);
@@ -70,7 +71,7 @@ public partial async Task AutoCompleteForumAutoTags(AutoComplete<int> autoTagId)
7071
if (!autoTagId.IsFocused)
7172
return;
7273

73-
var autoTags = await db.AutoTags.Where(x => x.GuildId == Context.GuildId).ToListAsync();
74+
var autoTags = await db.AutoTags.Where(x => x.GuildId == Context.GuildId).ToListAsyncEF();
7475
autoTagId.AutoComplete(Context, autoTags);
7576
}
7677
}

Administrator.Bot/Modules/Impl/LevelRewardModule.Impl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public partial async Task Add(int tier, int level, string? grantedRoleStr, strin
228228
if (!view.Result)
229229
return;
230230

231-
await Response();
231+
await Response("Level reward applied.");
232232

233233
var appliedCount = 0;
234234
var failedCount = 0;

Administrator.Bot/Services/ImageService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public async Task<Result<LocalAttachment>> GenerateXpImageAsync(Snowflake? guild
4141
.AsCte()
4242
.Where(x => x.UserId == longId)
4343
.Select(x => x.Rank)
44-
.FirstOrDefaultAsync();
44+
.FirstOrDefaultAsyncLinqToDB();
4545

4646
Member? member = null;
4747
GuildSettings guildSettings = default;
@@ -61,7 +61,7 @@ public async Task<Result<LocalAttachment>> GenerateXpImageAsync(Snowflake? guild
6161
.AsCte()
6262
.Where(x => x.UserId == longId)
6363
.Select(x => x.Rank)
64-
.FirstOrDefaultAsync();
64+
.FirstOrDefaultAsyncLinqToDB();
6565

6666
guildSettings = await db.Guilds.GetValueOrDefault(guildId.Value, g => g.Settings);
6767
}

Administrator.Bot/Services/InviteFilterService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using Disqord.Http;
99
using Disqord.Rest;
1010
using LinqToDB;
11+
using LinqToDB.EntityFrameworkCore;
1112
using Microsoft.Extensions.Logging;
1213

1314
namespace Administrator.Bot;
@@ -119,7 +120,7 @@ protected override async ValueTask OnMessageReceived(BotMessageReceivedEventArgs
119120
_checkedInvites.Remove(key, out _);
120121
}
121122

122-
var inviteFilterExemptions = await db.InviteFilterExemptions.Where(x => x.GuildId == guildId).ToListAsync();
123+
var inviteFilterExemptions = await db.InviteFilterExemptions.Where(x => x.GuildId == guildId).ToListAsyncEF();
123124

124125
if (!InviteRegex.IsMatch(e.Message.Content, out var match))
125126
return;

Administrator.Bot/Services/QuartzService.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Administrator.Database;
44
using Disqord.Bot.Hosting;
55
using LinqToDB;
6+
using LinqToDB.EntityFrameworkCore;
67
using Microsoft.Extensions.Logging;
78
using Qommon;
89
using Quartz;
@@ -20,13 +21,13 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
2021

2122
await using var scope = Bot.Services.CreateAsyncScopeWithDatabase(out var db);
2223

23-
var reminders = await db.Reminders.Where(x => x.CreatedAt != x.ExpiresAt).ToListAsync(stoppingToken);
24+
var reminders = await db.Reminders.Where(x => x.CreatedAt != x.ExpiresAt).ToListAsyncEF(stoppingToken);
2425
await scheduler.ScheduleAdminJobs<ReminderExpiryJob, Reminder>(reminders);
2526
Logger.LogDebug("Scheduled {Count} reminder expiry jobs.", reminders.Count);
2627

27-
var membersWithDecay = await db.Members.Where(x => x.NextDemeritPointDecay != null).ToListAsync(stoppingToken);
28-
var warningsWithDemeritPoints = await db.Punishments.OfType<Warning>().Where(x => x.DemeritPointsRemaining > 0 && x.RevokedAt == null).ToListAsync(stoppingToken);
29-
var guilds = await db.Guilds.ToListAsync(stoppingToken);
28+
var membersWithDecay = await db.Members.Where(x => x.NextDemeritPointDecay != null).ToListAsyncEF(stoppingToken);
29+
var warningsWithDemeritPoints = await db.Punishments.OfType<Warning>().Where(x => x.DemeritPointsRemaining > 0 && x.RevokedAt == null).ToListAsyncEF(stoppingToken);
30+
var guilds = await db.Guilds.ToListAsyncEF(stoppingToken);
3031
var warningsWithDecay = membersWithDecay.Select(member => new
3132
{
3233
Member = member,
@@ -45,7 +46,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
4546

4647
var punishments = await db.Punishments.OfType<RevocablePunishment>()
4748
.Where(x => x.RevokedAt == null)
48-
.ToListAsync(stoppingToken);
49+
.ToListAsyncEF(stoppingToken);
4950

5051
var expiringPunishments = punishments.Where(x => x is IExpiringEntity { ExpiresAt: not null }).ToList();
5152
await SchedulePunishmentExpiryJobsAsync(scheduler, expiringPunishments);
@@ -121,7 +122,7 @@ public async ValueTask UnscheduleDemeritPointDecayJobAsync(Warning warning)
121122
x.RevokedAt == null &&
122123
x.DemeritPointsRemaining > 0)
123124
.OrderByDescending(x => x.Id)
124-
.FirstOrDefaultAsync();
125+
.FirstOrDefaultAsyncEF();
125126

126127
if (otherWarning is not null)
127128
{

Administrator.Core/Administrator.Core.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Disqord.Core" Version="1.0.0-alpha5.91" />
12-
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.4" />
13-
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.4" />
14-
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" Version="9.0.4" />
15-
<PackageReference Include="NodaTime" Version="3.2.2" />
11+
<PackageReference Include="Disqord.Core" Version="1.0.0-alpha5.101" />
12+
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.12" />
13+
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.12" />
14+
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" Version="9.0.12" />
15+
<PackageReference Include="NodaTime" Version="3.3.0" />
1616
<PackageReference Include="Qmmands" Version="6.0.0-alpha8" />
1717
<PackageReference Include="Serilog" Version="4.3.0" />
1818
</ItemGroup>

Administrator.Database/Administrator.Database.csproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010
<ItemGroup>
1111
<PackageReference Include="EFCore.NamingConventions" Version="9.0.0" />
1212
<PackageReference Include="Humanizer.Core" Version="3.0.1" />
13-
<PackageReference Include="linq2db" Version="6.0.0-preview.4" />
14-
<PackageReference Include="linq2db.EntityFrameworkCore" Version="9.1.0-preview.4" />
15-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.4" />
16-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.4">
13+
<PackageReference Include="linq2db" Version="6.1.0" />
14+
<PackageReference Include="linq2db.EntityFrameworkCore" Version="9.2.0" />
15+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.12" />
16+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.12">
1717
<PrivateAssets>all</PrivateAssets>
1818
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1919
</PackageReference>
20-
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.4" />
21-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.4" />
22-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.4" />
23-
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.4" />
20+
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.12" />
21+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.12" />
22+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.12" />
23+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.12" />
2424
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
2525
</ItemGroup>
2626

Administrator/Administrator.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.7" />
14-
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.4" />
15-
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.4" />
13+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="9.0.12" />
14+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.12" />
15+
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.12" />
1616
<PackageReference Include="Serilog" Version="4.3.0" />
1717
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" />
1818
<PackageReference Include="Serilog.Extensions.Hosting" Version="9.0.0" />

0 commit comments

Comments
 (0)