mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-11 13:56:15 +00:00
fix(bots/discord/commands/moderation): check if timeout amount is safe in role-preset commands
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -78,7 +78,7 @@ export default new ModerationCommand({
|
||||
)
|
||||
}
|
||||
|
||||
if (expires)
|
||||
if (Number.isSafeInteger(expires))
|
||||
setTimeout(() => {
|
||||
removeRolePreset(member, preset)
|
||||
}, expires)
|
||||
|
||||
Reference in New Issue
Block a user