data = await request.get_json()
target_member = await core.getGuildMember(guild, target_user)
new_member = target_member.copy()
if "roles" in data: # TODO: add MEMBER_ROLE_UPDATE audit log event
await member.checkPermission(GuildPermissions.MANAGE_ROLES)
roles = [int(role) for role in data["roles"]]
guild_roles = {role.id: role for role in await core.getRoles(guild)}
https://github.com/yepcord/server/blob/bec8522f69025fd97aec7184947f46ec0a7cfc1c/server/http_api/main.py#L1635