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 5bcfa21..d82763a 100644 --- a/src/clients/jellyfin/jellyfin.service.ts +++ b/src/clients/jellyfin/jellyfin.service.ts @@ -56,7 +56,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 dbead9e..7126a0f 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({