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

@@ -343,7 +343,7 @@ where ((guildid >> 22) % {_creds.TotalShards}) == {_client.ShardId};")
using var uow = _db.GetDbContext();
if (await uow.Repeaters.AsNoTracking().CountAsyncEF() < MAX_REPEATERS)
if (await uow.Repeaters.AsNoTracking().CountAsyncEF(x => x.GuildId == guildId) < MAX_REPEATERS)
uow.Repeaters.Add(rep);
else
return null;