Skip to content

Commit

Permalink
[5.4.2] fix(skip): error in command and autoremove logs (#196)
Browse files Browse the repository at this point in the history
There is a wrong `redEmbed` call in command which leads to an error.

I also think it's better to remove interaction reply after time.

## Status and versioning classification:

- Code changes have been tested against the Discord API, or there are no
code changes
- I know how to update typings and have done so, or typings don't need
updating
  • Loading branch information
brianferri authored Jan 12, 2024
2 parents fd483af + 422eabc commit 66a4987
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
11 changes: 7 additions & 4 deletions djs-bot/commands/music/skip.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,23 @@ const command = new SlashCommand()
if (status === 1) {
return interaction.reply({
embeds: [
redEmbed(
`There is nothing after [${song.title}](${song.uri}) in the queue.`
),
redEmbed({
desc: `There is nothing after [${song.title}](${song.uri}) in the queue.`
}),
],
});
}

interaction.reply({
const ret = await interaction.reply({
embeds: [
new EmbedBuilder()
.setColor(client.config.embedColor)
.setDescription("✅ | **Skipped!**"),
],
fetchReply: true
});
if (ret) setTimeout(() => ret.delete().catch(client.warn), 20000);
return ret;
});

module.exports = command;
4 changes: 2 additions & 2 deletions djs-bot/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 djs-bot/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"description": "",
"main": "index.js",
"version": "5.4.1",
"version": "5.4.2",
"name": "discord-musicbot",
"scripts": {
"guild": "npm run api-build && node scripts/guild",
Expand Down

0 comments on commit 66a4987

Please sign in to comment.