Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
FirezTheGreat committed Oct 19, 2022
1 parent 2dae15a commit 2bcb7a2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions commands/moderation/penalty.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ module.exports = class Penalty extends Command {
}
},
{
new: true,
new: true
}
);

Expand Down Expand Up @@ -356,7 +356,7 @@ module.exports = class Penalty extends Command {
}, existingTimeout > 0 ? existingTimeout + timeout : timeout);
};

if (interaction.member.manageable) {
if (member.manageable) {
await member.setNickname(`[${player.points.current}] ${player.name}`);
} else {
await interaction.channel.send({ content: `*IGN has been updated to our database but failed to rename ${member}\'s IGN on discord.*` });
Expand Down Expand Up @@ -451,15 +451,15 @@ module.exports = class Penalty extends Command {
}
},
{
new: true,
new: true
}
);

await Penalties.deleteOne({ id: penalty.id });

member.communicationDisabledUntilTimestamp ? await member.disableCommunicationUntil(member.communicationDisabledUntilTimestamp - penalty.duration_timestamp > 0 ? member.communicationDisabledUntilTimestamp - penalty.duration_timestamp : null) : null;

if (interaction.member.manageable) {
if (member.manageable) {
await member.setNickname(`[${player.points.current}] ${player.name}`);
} else {
await interaction.channel.send({ content: `*IGN has been updated to our database but failed to rename ${member}\'s IGN on discord.*` });
Expand Down

0 comments on commit 2bcb7a2

Please sign in to comment.