- you should be able to update your .atl now without disabling it

- capitalization of language input in .atl should no longer matter
This commit is contained in:
Kwoth
2021-12-17 17:08:05 +01:00
parent a2b25f8246
commit 14f2851072
6 changed files with 42 additions and 21 deletions

View File

@@ -1,6 +1,7 @@
using System.Linq;
using System.Threading.Tasks;
using LinqToDB.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using NadekoBot.Services.Database.Models;
namespace NadekoBot.Modules.Searches
@@ -8,6 +9,8 @@ namespace NadekoBot.Modules.Searches
public static class AtlExtensions
{
public static Task<AutoTranslateChannel> GetByChannelId(this IQueryable<AutoTranslateChannel> set, ulong channelId)
=> set.FirstOrDefaultAsyncLinqToDB(x => x.ChannelId == channelId);
=> set
.Include(x => x.Users)
.FirstOrDefaultAsyncEF(x => x.ChannelId == channelId);
}
}