updating defaults
This commit is contained in:
parent
43038d3983
commit
19b1066e73
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue