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 = {
|
export = {
|
||||||
name: "botinfo",
|
name: "botinfo",
|
||||||
description: "Get information about the bot",
|
description: "Get information about the bot",
|
||||||
|
dev: false,
|
||||||
public: true,
|
public: true,
|
||||||
dev: true,
|
|
||||||
|
|
||||||
data: new SlashCommandBuilder()
|
data: new SlashCommandBuilder()
|
||||||
.setName("botinfo")
|
.setName("botinfo")
|
||||||
|
|||||||
@@ -44,6 +44,26 @@ export = {
|
|||||||
const { default: prettyMs } = await import("pretty-ms")
|
const { default: prettyMs } = await import("pretty-ms")
|
||||||
const prettyTime = prettyMs(time, { verbose: true })
|
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) {
|
if (target.user.bot) {
|
||||||
interaction.editReply({
|
interaction.editReply({
|
||||||
embeds: [{
|
embeds: [{
|
||||||
|
|||||||
Reference in New Issue
Block a user