diff --git a/src/clients/discord/discord.message.service.ts b/src/clients/discord/discord.message.service.ts index 155108a..6524b47 100644 --- a/src/clients/discord/discord.message.service.ts +++ b/src/clients/discord/discord.message.service.ts @@ -53,7 +53,7 @@ export class DiscordMessageService { text: `${date}`, }); - if (description !== undefined && description.length > 0) { + if (!description && description.length >= 1) { embedBuilder = embedBuilder.setDescription(description); } diff --git a/src/clients/jellyfin/jellyfin.service.ts b/src/clients/jellyfin/jellyfin.service.ts index fdab370..343733e 100644 --- a/src/clients/jellyfin/jellyfin.service.ts +++ b/src/clients/jellyfin/jellyfin.service.ts @@ -61,7 +61,7 @@ export class JellyfinService { } destroy() { - if (this.api === undefined) { + if (!this.api) { this.logger.warn( 'Jellyfin Api Client was unexpectitly undefined. Graceful destroy has failed', ); diff --git a/src/commands/play.comands.ts b/src/commands/play.comands.ts index a2f0a2a..4bc58fc 100644 --- a/src/commands/play.comands.ts +++ b/src/commands/play.comands.ts @@ -64,7 +64,7 @@ export class PlayItemCommand ), ); - if (parsedItems.length < 1) { + if (parsedItems.length === 0) { return { embeds: [ this.discordMessageService.buildErrorMessage({