mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-06-27 01:02:41 +02:00
fix: Ensure guild settings exist in DB before updating (#999)
This commit is contained in:
parent
aba622cb8d
commit
1d5729fd6c
2 changed files with 4 additions and 0 deletions
|
@ -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"
|
||||
|
|
|
@ -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')!;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue