change: adding a role to a sar group which already exists in another group will simply move it, instead of reporting success but not doing anything

This commit is contained in:
Kwoth
2024-12-27 07:00:06 +00:00
parent 1da19a51f6
commit e78a7d0efa

View File

@@ -59,10 +59,15 @@ public class SelfAssignedRolesService : INService, IReadyExecutor
},
_ => new()
{
SarGroupId = ctx.GetTable<SarGroup>()
.Where(x => x.GuildId == guildId && x.GroupNumber == groupNumber)
.Select(x => x.Id)
.First()
},
() => new()
{
RoleId = roleId,
GuildId = guildId,
});
}