aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package.json1
-rw-r--r--src/commands/config.ts3
2 files changed, 4 insertions, 0 deletions
diff --git a/package.json b/package.json
index d39eaf0..853d9d9 100644
--- a/package.json
+++ b/package.json
@@ -25,6 +25,7 @@
"migrations:generate": "npm run prisma:with-env migrate dev",
"migrations:run": "npm run prisma:with-env migrate deploy",
"prisma:with-env": "npm run env:set-database-url prisma",
+ "prisma:generate": "prisma generate",
"env:set-database-url": "tsx src/scripts/run-with-database-url.ts",
"release": "release-it",
"build": "tsc"
diff --git a/src/commands/config.ts b/src/commands/config.ts
index ae3bc45..7f25a2e 100644
--- a/src/commands/config.ts
+++ b/src/commands/config.ts
@@ -38,6 +38,9 @@ export default class implements Command {
.setDescription('show all settings'));
async execute(interaction: ChatInputCommandInteraction) {
+ // Ensure guild settings exist before trying to update
+ await getGuildSettings(interaction.guild!.id);
+
switch (interaction.options.getSubcommand()) {
case 'set-playlist-limit': {
const limit: number = interaction.options.getInteger('limit')!;