Skip to content

Commit

Permalink
Merge pull request #70 from Ayrox/dev
Browse files Browse the repository at this point in the history
fixes
  • Loading branch information
Ayrox authored Jan 18, 2022
2 parents 74e3f0d + 5123b21 commit 5964c31
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 39 deletions.
74 changes: 38 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Commands/music/skip.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {

let skipNumber = (message.options.getNumber("how-many") === null) ? 1 : Math.floor(message.options.getNumber("how-many"));
const queue = client.distube.getQueue(message)
if (!queue) return message.reply({ embeds: [errorEmbed().setDescription(`La file d'attente est actuellement vide !`)], ephemeral: true })
if (nextSong === undefined && queue.autoplay === false) return interaction.reply({ embeds: [errorEmbed().setDescription(`La file d'attente est actuellement vide !`)], ephemeral: true })
if (queue.songs[skipNumber] === undefined) return message.reply({ embeds: [errorEmbed().setDescription(`La file d'attente est actuellement vide !`)], ephemeral: true })

message.reply({
Expand Down
4 changes: 2 additions & 2 deletions src/Events/Interaction/musicButtons.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { ButtonInteraction, Client } = require("discord.js");
const { errorEmbed, musicEmbed } = require("../../util/Embeds");
const {musicButtonRow } = require("../../util/buttonLayout")

const { generateProgressBar } = require("../../util/functions")


module.exports = {
Expand Down Expand Up @@ -148,7 +148,7 @@ module.exports = {

const nextSong = queue.songs[1]

if (nextSong === undefined) return interaction.reply({ embeds: [errorEmbed().setDescription(`La file d'attente est actuellement vide !`)], ephemeral: true })
if (nextSong === undefined && queue.autoplay === false) return interaction.reply({ embeds: [errorEmbed().setDescription(`La file d'attente est actuellement vide !`)], ephemeral: true })

interaction.message.edit({
embeds: [
Expand Down

0 comments on commit 5964c31

Please sign in to comment.