mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-10 15:57:53 +00:00
Merge branch 'main' into confirm-clear
This commit is contained in:
commit
17c3640fd3
25 changed files with 224 additions and 49 deletions
|
|
@ -38,8 +38,9 @@ namespace PluralKit.Bot
|
|||
|
||||
// Check group cap
|
||||
var existingGroupCount = await conn.QuerySingleAsync<int>("select count(*) from groups where system = @System", new { System = ctx.System.Id });
|
||||
if (existingGroupCount >= Limits.MaxGroupCount)
|
||||
throw new PKError($"System has reached the maximum number of groups ({Limits.MaxGroupCount}). Please delete unused groups first in order to create new ones.");
|
||||
var groupLimit = ctx.System.GroupLimitOverride ?? Limits.MaxGroupCount;
|
||||
if (existingGroupCount >= groupLimit)
|
||||
throw new PKError($"System has reached the maximum number of groups ({groupLimit}). Please delete unused groups first in order to create new ones.");
|
||||
|
||||
// Warn if there's already a group by this name
|
||||
var existingGroup = await _repo.GetGroupByName(conn, ctx.System.Id, groupName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue