diff --git a/server.ts b/server.ts index 1770f58..f3189fd 100644 --- a/server.ts +++ b/server.ts @@ -40,7 +40,7 @@ interface Config { musicDir: string; allowGuests: boolean; defaultPermissions: { - channel?: string["listen", "control"]; + channel?: string; }; } @@ -50,7 +50,7 @@ const DEFAULT_CONFIG: Config = { port: 3001, musicDir: "./music", allowGuests: true, - defaultPermissions: [''] + defaultPermissions: ["listen", "control"] }; // Create default config if missing @@ -58,6 +58,8 @@ const configFile = file(CONFIG_PATH); if (!(await configFile.exists())) { console.log("[Config] Creating default config.json..."); await Bun.write(CONFIG_PATH, JSON.stringify(DEFAULT_CONFIG, null, 2)); + console.log("Config created at config.json. Have a look at it then restart the server. Bye!"); + process.exit(); } const config: Config = await configFile.json();