change auto role log to include the guild
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 39s

This commit is contained in:
Lee 2024-07-03 22:18:51 +01:00
parent 655662c6f8
commit 2b4980fb10

@ -49,7 +49,11 @@ public class AutoRoleListener implements EventListener {
event.getGuild().addRoleToMember(event.getMember(), role).queue(); event.getGuild().addRoleToMember(event.getMember(), role).queue();
} }
toRemove.forEach(profile::removeRole); toRemove.forEach(profile::removeRole);
log.info("Gave user \"{}\" {} auto roles{}", user.getId(), profile.getRoles().size(), toRemove.isEmpty() ? "" log.info("Gave user \"{}\" {} auto roles in guild \"{}\"{}",
: " and removed %s invalid roles".formatted(toRemove.size())); user.getId(),
profile.getRoles().size(),
guild.getName(),
toRemove.isEmpty() ? "" : " and removed %s invalid roles from the profile".formatted(toRemove.size())
);
} }
} }