Updated timeout command to limit to 28d

Removed dev flag
This commit is contained in:
2024-01-31 18:14:01 +01:00
parent 57f79ebd75
commit 3fc17aeaa7
2 changed files with 21 additions and 1 deletions

View File

@@ -44,6 +44,26 @@ export = {
const { default: prettyMs } = await import("pretty-ms")
const prettyTime = prettyMs(time, { verbose: true })
if (!time) {
await interaction.editReply({
embeds: [{
description: "Time is invalid for some reason",
color: embedColor
}]
})
return
}
if (time > 2419140000) {
await interaction.editReply({
embeds: [{
description: "You cannot timeout a user for more than 27 days 23 hours 59 minutes.",
color: embedColor
}]
})
return
}
if (target.user.bot) {
interaction.editReply({
embeds: [{