fix: Ensure guild settings exist in DB before updating (#999)

This commit is contained in:
Matt Foxx 2024-02-16 22:13:45 -05:00 committed by GitHub
parent aba622cb8d
commit 1d5729fd6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View file

@ -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')!;