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.

34 lines 1.03 kB
"use strict"; /* * SPDX-License-Identifier: GPL-3.0-or-later * Copyright © 2025 BotForge */ Object.defineProperty(exports, "__esModule", { value: true }); const NativeFunction_1 = require("../../structures/@internal/NativeFunction"); exports.default = new NativeFunction_1.NativeFunction({ name: "$httpResult", version: "1.2.0", description: "Retrieve an http result value", brackets: false, unwrap: true, args: [ { name: "key", description: "The key to return its value", required: true, type: NativeFunction_1.ArgType.String, rest: true }, ], output: [ NativeFunction_1.ArgType.Json, NativeFunction_1.ArgType.Unknown ], execute(ctx, [args]) { if (!this.hasFields) return this.successJSON(ctx.getEnvironmentKey("result")); const env = ctx.getEnvironmentKey("result", ...args); return this.successJSON(env); }, }); //# sourceMappingURL=httpResult.js.map