diff --git a/package.json b/package.json index d39eaf07..853d9d95 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 ae3bc458..7f25a2e7 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')!;