fix(example): use paused as variable name

This commit is contained in:
Androz 2021-08-20 18:29:30 +02:00 committed by GitHub
parent 12e448a254
commit 90416d7f90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -258,14 +258,14 @@ client.on("interactionCreate", async (interaction) => {
await interaction.deferReply();
const queue = player.getQueue(interaction.guildId);
if (!queue || !queue.playing) return void interaction.followUp({ content: "❌ | No music is being played!" });
const success = queue.setPaused(true);
return void interaction.followUp({ content: success ? "⏸ | Paused!" : "❌ | Something went wrong!" });
const paused = queue.setPaused(true);
return void interaction.followUp({ content: paused ? "⏸ | Paused!" : "❌ | Something went wrong!" });
} else if (interaction.commandName === "resume") {
await interaction.deferReply();
const queue = player.getQueue(interaction.guildId);
if (!queue || !queue.playing) return void interaction.followUp({ content: "❌ | No music is being played!" });
const success = queue.setPaused(false);
return void interaction.followUp({ content: success ? "❌ | Something went wrong!" : "▶ | Resumed!" });
const paused = queue.setPaused(false);
return void interaction.followUp({ content: !paused ? "❌ | Something went wrong!" : "▶ | Resumed!" });
} else if (interaction.commandName === "stop") {
await interaction.deferReply();
const queue = player.getQueue(interaction.guildId);