Cleanup, Added string and repeat limit fixes from 1.9 branch

This commit is contained in:
Kwoth
2021-06-19 07:21:10 +02:00
parent 797e93da1d
commit 81406cb46a
5 changed files with 3 additions and 163 deletions

View File

@@ -77,17 +77,6 @@ namespace NadekoBot.Db
.Sum(x => x.Price);
}
public static int AffinityCount(this DbSet<WaifuUpdate> updates, ulong userId)
{
return updates
.FromSqlInterpolated($@"SELECT 1
FROM WaifuUpdates
WHERE UserId = (SELECT Id from DiscordUser WHERE UserId={userId}) AND
UpdateType = 0 AND
NewId IS NOT NULL")
.Count();
}
public static ulong GetWaifuUserId(this DbSet<WaifuInfo> waifus, ulong ownerId, string name)
{
return waifus