From 86ffb19c9a7a99ad81f173cf73aee2828df9234c Mon Sep 17 00:00:00 2001 From: Manuel Ruwe Date: Sat, 17 Dec 2022 22:22:44 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Inverted=20pause=20states=20for?= =?UTF-8?q?=20pause=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/clients/discord/discord.voice.service.ts | 4 ++-- src/commands/play.comands.ts | 18 ++++-------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/src/clients/discord/discord.voice.service.ts b/src/clients/discord/discord.voice.service.ts index 4464091..b1d375f 100644 --- a/src/clients/discord/discord.voice.service.ts +++ b/src/clients/discord/discord.voice.service.ts @@ -122,11 +122,11 @@ export class DiscordVoiceService { togglePaused(): boolean { if (this.isPaused()) { this.unpause(); - return true; + return false; } this.pause(); - return false; + return true; } disconnect(): GenericTryHandler { diff --git a/src/commands/play.comands.ts b/src/commands/play.comands.ts index 2fa8ba9..a48e098 100644 --- a/src/commands/play.comands.ts +++ b/src/commands/play.comands.ts @@ -11,7 +11,6 @@ import { import { Logger } from '@nestjs/common/services'; import { ComponentType, - EmbedBuilder, Events, GuildMember, Interaction, @@ -19,7 +18,6 @@ import { } from 'discord.js'; import { JellyfinSearchService } from '../clients/jellyfin/jellyfin.search.service'; import { TrackRequestDto } from '../models/track-request.dto'; -import { DefaultJellyfinColor } from '../types/colors'; import { DiscordMessageService } from '../clients/discord/discord.message.service'; @@ -192,18 +190,10 @@ export class PlayItemCommand await interaction.update({ embeds: [ - new EmbedBuilder() - .setAuthor({ - name: 'Jellyfin Search', - iconURL: - 'https://github.com/walkxcode/dashboard-icons/blob/main/png/jellyfin.png?raw=true', - }) - .setTitle(item.Name) - .setDescription( - `**Duration**: ${duration}\n**Artists**: ${artists}\n\nTrack was added to the queue at position ${addedIndex}`, - ) - .setColor(DefaultJellyfinColor) - .toJSON(), + this.discordMessageService.buildMessage({ + title: 'Jellyfin Search', + description: `**Duration**: ${duration}\n**Artists**: ${artists}\n\nTrack was added to the queue at position ${addedIndex}`, + }), ], components: [], });