diff --git a/bots/discord/src/commands/moderation/mute.ts b/bots/discord/src/commands/moderation/mute.ts index 1e34236..1032a21 100644 --- a/bots/discord/src/commands/moderation/mute.ts +++ b/bots/discord/src/commands/moderation/mute.ts @@ -63,7 +63,7 @@ export default new ModerationCommand({ createModerationActionEmbed('Muted', user, executor.user, reason, Math.ceil(expires / 1000)), ) - if (duration) + if (Number.isSafeInteger(expires)) setTimeout(() => { removeRolePreset(member, 'mute') }, duration) diff --git a/bots/discord/src/commands/moderation/role-preset.ts b/bots/discord/src/commands/moderation/role-preset.ts index 9e9f689..04f3038 100644 --- a/bots/discord/src/commands/moderation/role-preset.ts +++ b/bots/discord/src/commands/moderation/role-preset.ts @@ -78,7 +78,7 @@ export default new ModerationCommand({ ) } - if (expires) + if (Number.isSafeInteger(expires)) setTimeout(() => { removeRolePreset(member, preset) }, expires)