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.05 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: "$bufferToString", version: "1.1.0", description: "Stringifies a buffer", unwrap: true, brackets: true, args: [ { name: "variable name", description: "The variable the buffer is allocated on", type: structures_1.ArgType.String, required: true, rest: false }, { name: "encoding", description: "The encoding to stringify with", type: structures_1.ArgType.String, rest: false } ], output: structures_1.ArgType.String, execute(ctx, [name, encoding]) { return this.success(void ctx.getEnvironmentInstance(Buffer, name)?.toString(encoding || "utf-8")); }, }); //# sourceMappingURL=bufferToString.js.map