mirror of
https://github.com/informaticker/discord-jellyfin-bot.git
synced 2024-11-23 18:21:55 +01:00
🎨 Code review
Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
This commit is contained in:
parent
3fd94e590d
commit
576d97ed82
@ -53,7 +53,7 @@ export class DiscordMessageService {
|
|||||||
text: `${date}`,
|
text: `${date}`,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (description !== undefined && description.length > 0) {
|
if (!description && description.length >= 1) {
|
||||||
embedBuilder = embedBuilder.setDescription(description);
|
embedBuilder = embedBuilder.setDescription(description);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ export class JellyfinService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
if (this.api === undefined) {
|
if (!this.api) {
|
||||||
this.logger.warn(
|
this.logger.warn(
|
||||||
'Jellyfin Api Client was unexpectitly undefined. Graceful destroy has failed',
|
'Jellyfin Api Client was unexpectitly undefined. Graceful destroy has failed',
|
||||||
);
|
);
|
||||||
|
@ -64,7 +64,7 @@ export class PlayItemCommand
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (parsedItems.length < 1) {
|
if (parsedItems.length === 0) {
|
||||||
return {
|
return {
|
||||||
embeds: [
|
embeds: [
|
||||||
this.discordMessageService.buildErrorMessage({
|
this.discordMessageService.buildErrorMessage({
|
||||||
|
Loading…
Reference in New Issue
Block a user