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.

37 lines 1.12 kB
"use strict"; /* * SPDX-License-Identifier: GPL-3.0-or-later * Copyright © 2025 BotForge */ Object.defineProperty(exports, "__esModule", { value: true }); const structures_1 = require("../../structures"); exports.default = new structures_1.NativeFunction({ name: "$hasComponents", version: "2.5.0", description: "Checks whether given message has components", brackets: false, unwrap: true, args: [ { name: "channel ID", description: "The channel to get message from", type: structures_1.ArgType.Channel, rest: false, required: true, check: (i) => "messages" in i }, { name: "message ID", pointer: 0, rest: false, required: true, type: structures_1.ArgType.Message, description: "The message to check for components" } ], output: structures_1.ArgType.Boolean, execute(ctx, [, msg]) { return this.success(!!(msg ?? ctx.message)?.components.length); }, }); //# sourceMappingURL=hasComponents.js.map