UNPKG

@tryforge/forgescript

Version:

ForgeScript is a comprehensive package that empowers you to effortlessly interact with Discord's API. It ensures scripting remains easy to learn and consistently effective.

47 lines 1.54 kB
"use strict"; /* * SPDX-License-Identifier: GPL-3.0-or-later * Copyright © 2025 BotForge */ Object.defineProperty(exports, "__esModule", { value: true }); const discord_js_1 = require("discord.js"); const structures_1 = require("../../structures"); exports.default = new structures_1.NativeFunction({ name: "$setDefaultThreadArchiveDuration", version: "1.5.0", description: "Sets a forum's default auto archive duration of posts", unwrap: true, output: structures_1.ArgType.Boolean, aliases: [ "$setDefaultThreadAutoArchiveDuration" ], brackets: true, args: [ { name: "channel ID", description: "The forum to modify", type: structures_1.ArgType.Channel, check: (i) => i.isThreadOnly(), rest: false, required: true }, { name: "duration", description: "The new duration of auto archive", type: structures_1.ArgType.Enum, enum: discord_js_1.ThreadAutoArchiveDuration, rest: false, required: true }, { name: "reason", description: "The reason for modifying archive duration", rest: false, type: structures_1.ArgType.String } ], async execute(ctx, [ch, dur, reason]) { return this.success(!!(await ch.setDefaultAutoArchiveDuration(dur, reason || ctx.reason).catch(ctx.noop))); }, }); //# sourceMappingURL=setDefaultThreadArchiveDuration.js.map