Skip to content

Commit 0c1382c

Browse files
committed
fix(bots/discord/commands/moderation): check if timeout amount is safe in role-preset commands
1 parent 410d289 commit 0c1382c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bots/discord/src/commands/moderation/mute.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default new ModerationCommand({
6363
createModerationActionEmbed('Muted', user, executor.user, reason, Math.ceil(expires / 1000)),
6464
)
6565

66-
if (duration)
66+
if (Number.isSafeInteger(expires))
6767
setTimeout(() => {
6868
removeRolePreset(member, 'mute')
6969
}, duration)

bots/discord/src/commands/moderation/role-preset.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export default new ModerationCommand({
7878
)
7979
}
8080

81-
if (expires)
81+
if (Number.isSafeInteger(expires))
8282
setTimeout(() => {
8383
removeRolePreset(member, preset)
8484
}, expires)

0 commit comments

Comments
 (0)