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:
Toastie 2024-12-27 20:50:11 +13:00
parent 2bf2d4465d
commit c574956d94
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4

View file

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