diff --git a/dist/native/formatting/subtext.d.ts.map b/dist/native/formatting/subtext.d.ts.map index 4cf8b79b2e..23d80f8a59 100644 --- a/dist/native/formatting/subtext.d.ts.map +++ b/dist/native/formatting/subtext.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"subtext.d.ts","sourceRoot":"","sources":["../../../src/native/formatting/subtext.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;;;;;;;;AAE1D,wBAkBE"} \ No newline at end of file +{"version":3,"file":"subtext.d.ts","sourceRoot":"","sources":["../../../src/native/formatting/subtext.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;;;;;;;;AAE1D,wBAmBE"} \ No newline at end of file diff --git a/dist/native/formatting/subtext.js b/dist/native/formatting/subtext.js index c96143e69f..beb2571cc2 100644 --- a/dist/native/formatting/subtext.js +++ b/dist/native/formatting/subtext.js @@ -4,6 +4,7 @@ const discord_js_1 = require("discord.js"); const structures_1 = require("../../structures"); exports.default = new structures_1.NativeFunction({ name: "$subtext", + version: "2.2.0", description: "Makes given text a subtext", unwrap: true, brackets: true, diff --git a/dist/native/formatting/subtext.js.map b/dist/native/formatting/subtext.js.map index 9a3811db82..6f4e97aa1f 100644 --- a/dist/native/formatting/subtext.js.map +++ b/dist/native/formatting/subtext.js.map @@ -1 +1 @@ -{"version":3,"file":"subtext.js","sourceRoot":"","sources":["../../../src/native/formatting/subtext.ts"],"names":[],"mappings":";;AAAA,2CAAoC;AACpC,iDAA0D;AAE1D,kBAAe,IAAI,2BAAc,CAAC;IAC9B,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,4BAA4B;IACzC,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,oBAAO,CAAC,MAAM;IACtB,IAAI,EAAE;QACF;YACI,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,0BAA0B;YACvC,IAAI,EAAE,KAAK;YACX,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,oBAAO,CAAC,MAAM;SACvB;KACJ;IACD,OAAO,CAAC,GAAG,EAAE,CAAE,GAAG,CAAE;QAChB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAA,oBAAO,EAAC,GAAG,CAAC,CAAC,CAAA;IACrC,CAAC;CACJ,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"subtext.js","sourceRoot":"","sources":["../../../src/native/formatting/subtext.ts"],"names":[],"mappings":";;AAAA,2CAAoC;AACpC,iDAA0D;AAE1D,kBAAe,IAAI,2BAAc,CAAC;IAC9B,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,4BAA4B;IACzC,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,oBAAO,CAAC,MAAM;IACtB,IAAI,EAAE;QACF;YACI,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,0BAA0B;YACvC,IAAI,EAAE,KAAK;YACX,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,oBAAO,CAAC,MAAM;SACvB;KACJ;IACD,OAAO,CAAC,GAAG,EAAE,CAAE,GAAG,CAAE;QAChB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAA,oBAAO,EAAC,GAAG,CAAC,CAAC,CAAA;IACrC,CAAC;CACJ,CAAC,CAAA"} \ No newline at end of file diff --git a/dist/native/http/httpSetBody.d.ts b/dist/native/http/httpSetBody.d.ts index d5794f891c..833c46e206 100644 --- a/dist/native/http/httpSetBody.d.ts +++ b/dist/native/http/httpSetBody.d.ts @@ -4,7 +4,7 @@ declare const _default: NativeFunction<[{ description: string; rest: false; required: true; - type: ArgType.Json; + type: ArgType.String; }], true>; export default _default; //# sourceMappingURL=httpSetBody.d.ts.map \ No newline at end of file diff --git a/dist/native/http/httpSetBody.js b/dist/native/http/httpSetBody.js index b14135b568..cb83524e84 100644 --- a/dist/native/http/httpSetBody.js +++ b/dist/native/http/httpSetBody.js @@ -11,13 +11,13 @@ exports.default = new NativeFunction_1.NativeFunction({ description: "The JSON body", rest: false, required: true, - type: NativeFunction_1.ArgType.Json, + type: NativeFunction_1.ArgType.String, }, ], unwrap: true, brackets: true, - execute(ctx, [json]) { - ctx.http.body = JSON.stringify(json); + execute(ctx, [body]) { + ctx.http.body = body; return this.success(); }, }); diff --git a/dist/native/http/httpSetBody.js.map b/dist/native/http/httpSetBody.js.map index 7e577d8484..bcbcda096f 100644 --- a/dist/native/http/httpSetBody.js.map +++ b/dist/native/http/httpSetBody.js.map @@ -1 +1 @@ -{"version":3,"file":"httpSetBody.js","sourceRoot":"","sources":["../../../src/native/http/httpSetBody.ts"],"names":[],"mappings":";;AAAA,8EAAmF;AAGnF,kBAAe,IAAI,+BAAc,CAAC;IAC9B,IAAI,EAAE,cAAc;IACpB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,kCAAkC;IAC/C,IAAI,EAAE;QACF;YACI,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,eAAe;YAC5B,IAAI,EAAE,KAAK;YACX,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,wBAAO,CAAC,IAAI;SACrB;KACJ;IACD,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;IACd,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC;QACf,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;QACpC,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;IACzB,CAAC;CACJ,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"httpSetBody.js","sourceRoot":"","sources":["../../../src/native/http/httpSetBody.ts"],"names":[],"mappings":";;AAAA,8EAAmF;AAGnF,kBAAe,IAAI,+BAAc,CAAC;IAC9B,IAAI,EAAE,cAAc;IACpB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,kCAAkC;IAC/C,IAAI,EAAE;QACF;YACI,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,eAAe;YAC5B,IAAI,EAAE,KAAK;YACX,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,wBAAO,CAAC,MAAM;SACvB;KACJ;IACD,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;IACd,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC;QACf,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QACpB,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;IACzB,CAAC;CACJ,CAAC,CAAA"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 757ed18cf5..fdf94d2984 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,7 @@ "": { "name": "@tryforge/forgescript", "version": "2.2.0", - "license": "MIT", + "license": "GPL-3.0", "dependencies": { "chalk": "^4.1.2", "discord.js": "^14.17.3", diff --git a/src/native/http/httpSetBody.ts b/src/native/http/httpSetBody.ts index 86ceb3a7c1..4dcc8ea56c 100644 --- a/src/native/http/httpSetBody.ts +++ b/src/native/http/httpSetBody.ts @@ -11,13 +11,13 @@ export default new NativeFunction({ description: "The JSON body", rest: false, required: true, - type: ArgType.Json, + type: ArgType.String, }, ], unwrap: true, brackets: true, - execute(ctx, [json]) { - ctx.http.body = JSON.stringify(json) + execute(ctx, [body]) { + ctx.http.body = body return this.success() }, })