Skip to content

Commit

Permalink
feat: add username to logs for not adding/removing logs
Browse files Browse the repository at this point in the history
  • Loading branch information
tippfehlr committed Apr 10, 2024
1 parent 35a5ee6 commit efbcef0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/modules/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@ export async function processRoles({
if (add) {
// does the cache need to be checked?
if (member.roles.cache.has(role.id)) {
log.warn(`the user already has the role ${role.name} in guild ${guild.name} (${guild.id})`);
log.warn(
`${member.displayName} (${member.user.username}) already has the role ${role.name} in guild ${guild.name} (${guild.id})`,
);
return;
}
if (permanent) {
Expand All @@ -297,7 +299,7 @@ export async function processRoles({
// does the cache need to be checked?
if (!member.roles.cache.has(role.id)) {
log.warn(
`can’t remove the role: the user doesn’t have the role ${role.name} in guild ${guild.name} (${guild.id})`,
`can’t remove the role: ${member.displayName} (${member.user.username}) doesn’t have the role ${role.name} in guild ${guild.name} (${guild.id})`,
);
return;
}
Expand Down

0 comments on commit efbcef0

Please sign in to comment.