From de6942ee57730c066d7c4591192a22fdd6cdb175 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Fri, 26 Aug 2022 00:31:42 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/Music/back.js | 17 +++-------------- commands/Music/skip.js | 23 +++-------------------- commands/Music/stop.js | 4 +--- 3 files changed, 7 insertions(+), 37 deletions(-) diff --git a/commands/Music/back.js b/commands/Music/back.js index d62c1b75..b46212f7 100644 --- a/commands/Music/back.js +++ b/commands/Music/back.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder, EmbedBuilder } = require("discord.js"); +const { SlashCommandBuilder } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Back extends BaseCommand { @@ -37,19 +37,8 @@ class Back extends BaseCommand { if (!queue) return interaction.error("music/play:NOT_PLAYING", null, { ephemeral: true }); if (!queue.previousTracks[0]) return interaction.error("music/back:NO_PREV_SONG", null, { ephemeral: true }); - const embed = new EmbedBuilder() - .setAuthor({ - name: interaction.translate("music/back:SUCCESS") - }) - .setThumbnail(queue.current.thumbnail) - .setDescription(`[${queue.current.title}](${queue.current.url})`) - .setColor(client.config.embed.color) - .setFooter({ - text: client.config.embed.footer - }); - - queue.back() - .then(() => interaction.reply({ embeds: [embed] })); + queue.back(); + interaction.success("music/back:SUCCESS"); } } diff --git a/commands/Music/skip.js b/commands/Music/skip.js index dc793ed8..02c51f3f 100644 --- a/commands/Music/skip.js +++ b/commands/Music/skip.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder, EmbedBuilder } = require("discord.js"); +const { SlashCommandBuilder } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Skip extends BaseCommand { @@ -36,25 +36,8 @@ class Skip extends BaseCommand { const queue = client.player.getQueue(interaction.guildId); if (!queue) return interaction.error("music/play:NOT_PLAYING"); - const skipped = queue.skip(); - if (skipped) { - const embed = new EmbedBuilder() - .setAuthor({ - name: interaction.translate("music/skip:SUCCESS") - }) - .setThumbnail(queue.current.thumbnail || null) - .setDescription(interaction.translate("music/play:NOW_PLAYING", { - songName: queue.current.title - })) - .setFooter({ - text: client.config.embed.footer - }) - .setColor(client.config.embed.color); - - interaction.reply({ - embeds: [embed] - }); - } + queue.skip(); + interaction.success("music/skip:SUCCESS"); } } diff --git a/commands/Music/stop.js b/commands/Music/stop.js index 96e670d5..581878ad 100644 --- a/commands/Music/stop.js +++ b/commands/Music/stop.js @@ -37,9 +37,7 @@ class Stop extends BaseCommand { if (!queue) return interaction.error("music/play:NOT_PLAYING"); queue.destroy(); - interaction.reply({ - content: interaction.translate("music/stop:SUCCESS") - }); + interaction.success("music/stop:SUCCESS"); } }