Skip to content

Commit 6ebe5c3

Browse files
refactor: convert DevLayer to js and correct spawner import
1 parent a634164 commit 6ebe5c3

File tree

6 files changed

+27
-6
lines changed

6 files changed

+27
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "create-discord-https",
33
"description": "Create Discord.https-powered bots with one command.",
4-
"version": "2.0.0",
4+
"version": "2.0.1",
55
"bin": {
66
"create-discord-https": "index.js"
77
},

templates/cloudflare-ts/src/DevLayer.ts renamed to templates/cloudflare-ts/src/DevLayer.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,14 @@ export async function tunnelLayer() {
8080
}
8181
}
8282

83-
export async function commandRegistrarLayer(client: any, guildId: string) {
83+
/**
84+
* Registers commands for a Discord client.
85+
*
86+
* @param {string} [guildId] - The optional ID of the guild where commands will be registered.
87+
* If not provided, commands will be registered globally.
88+
*/
89+
90+
export async function commandRegistrarLayer(client, guildId) {
8491
if (process.env.NODE_ENV !== "production") {
8592
const FILENAME = "__dev_layer_cache__";
8693
const chalk = (await import("chalk")).default;

templates/node-ts/src/DevLayer.ts renamed to templates/node-ts/src/DevLayer.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,14 @@ export async function tunnelLayer() {
7676
}
7777
}
7878

79-
export async function commandRegistrarLayer(client: any, guildId?: string) {
79+
/**
80+
* Registers commands for a Discord client.
81+
*
82+
* @param {string} [guildId] - The optional ID of the guild where commands will be registered.
83+
* If not provided, commands will be registered globally.
84+
*/
85+
86+
export async function commandRegistrarLayer(client, guildId) {
8087
if (process.env.NODE_ENV !== "production") {
8188
const FILENAME = "__dev_layer_cache__";
8289
const chalk = (await import("chalk")).default;

templates/vercel-ts/src/DevLayer.ts renamed to templates/vercel-ts/src/DevLayer.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,14 @@ export async function tunnelLayer() {
7676
}
7777
}
7878

79-
export async function commandRegistrarLayer(client: any, guildId?: string) {
79+
/**
80+
* Registers commands for a Discord client.
81+
*
82+
* @param {string} [guildId] - The optional ID of the guild where commands will be registered.
83+
* If not provided, commands will be registered globally.
84+
*/
85+
86+
export async function commandRegistrarLayer(client, guildId) {
8087
if (process.env.NODE_ENV !== "production") {
8188
const FILENAME = "__dev_layer_cache__";
8289
const chalk = (await import("chalk")).default;

templates/vercel-ts/src/spawner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { spawn } from "child_process";
44
import chalk from "chalk"; // npm install chalk
55

6-
import { tunnelLayer } from "./DevLayer";
6+
import { tunnelLayer } from "./DevLayer.js";
77

88
await tunnelLayer();
99
console.log(chalk.greenBright("Tunnel spawned and ready!\n\n"));

templates/vercel/src/spawner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { spawn } from "child_process";
44
import chalk from "chalk"; // npm install chalk
55

6-
import { tunnelLayer } from "./DevLayer";
6+
import { tunnelLayer } from "./DevLayer.js";
77

88
await tunnelLayer();
99
console.log(chalk.greenBright("Tunnel spawned and ready!\n\n"));

0 commit comments

Comments
 (0)