Updated timeout command to limit to 28d
Removed dev flag
This commit is contained in:
@@ -8,8 +8,8 @@ const { dependencies, devDependencies } = require("../../package.json")
|
||||
export = {
|
||||
name: "botinfo",
|
||||
description: "Get information about the bot",
|
||||
dev: false,
|
||||
public: true,
|
||||
dev: true,
|
||||
|
||||
data: new SlashCommandBuilder()
|
||||
.setName("botinfo")
|
||||
|
||||
@@ -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: [{
|
||||
|
||||
Reference in New Issue
Block a user