Skip to content

Commit

Permalink
Merge branch 'develop' into refactor-logs
Browse files Browse the repository at this point in the history
  • Loading branch information
archv authored Jan 12, 2024
2 parents 9737bda + dd185a2 commit fcf9113
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 13 deletions.
6 changes: 4 additions & 2 deletions djs-bot/commands/music/247.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const command = new SlashCommand()
);
const twentyFourSeven = player.get("twentyFourSeven");

if (!twentyFourSeven || twentyFourSeven === false) {
if (!twentyFourSeven) {
player.set("twentyFourSeven", true);
} else {
player.set("twentyFourSeven", false);
Expand All @@ -66,7 +66,9 @@ const command = new SlashCommand()
player.destroy();
}

return interaction.reply({ embeds: [twentyFourSevenEmbed] });
const ret = await interaction.reply({ embeds: [twentyFourSevenEmbed], fetchReply: true });
if (ret) setTimeout(() => ret.delete().catch(client.warn), 20000);
return ret;
});

module.exports = command;
6 changes: 4 additions & 2 deletions djs-bot/commands/music/autoleave.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const command = new SlashCommand()
const autoLeave = player.get("autoLeave");
player.set("requester", interaction.guild.members.me);

if (!autoLeave || autoLeave === false) {
if (!autoLeave) {
player.set("autoLeave", true);
} else {
player.set("autoLeave", false);
Expand All @@ -56,7 +56,9 @@ const command = new SlashCommand()
}`
);

return interaction.reply({ embeds: [autoLeaveEmbed] });
const ret = await interaction.reply({ embeds: [autoLeaveEmbed], fetchReply: true });
if (ret) setTimeout(() => ret.delete().catch(client.warn), 20000);
return ret;
});

module.exports = command;
6 changes: 4 additions & 2 deletions djs-bot/commands/music/autopause.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const command = new SlashCommand()
const autoPause = player.get("autoPause");
player.set("requester", interaction.guild.members.me);

if (!autoPause || autoPause === false) {
if (!autoPause) {
player.set("autoPause", true);
} else {
player.set("autoPause", false);
Expand All @@ -56,7 +56,9 @@ const command = new SlashCommand()
}`
);

return interaction.reply({ embeds: [autoPauseEmbed] });
const ret = await interaction.reply({ embeds: [autoPauseEmbed], fetchReply: true });
if (ret) setTimeout(() => ret.delete().catch(client.warn), 20000);
return ret;
});

module.exports = command;
6 changes: 4 additions & 2 deletions djs-bot/commands/music/autoqueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const command = new SlashCommand()
const autoQueue = player.get("autoQueue");
player.set("requester", interaction.guild.members.me);

if (!autoQueue || autoQueue === false) {
if (!autoQueue) {
player.set("autoQueue", true);
} else {
player.set("autoQueue", false);
Expand All @@ -55,7 +55,9 @@ const command = new SlashCommand()
}`,
);

return interaction.reply({ embeds: [autoQueueEmbed({autoQueue})] });
const ret = await interaction.reply({ embeds: [autoQueueEmbed({autoQueue})], fetchReply: true });
if (ret) setTimeout(() => ret.delete().catch(client.warn), 20000);
return ret;
});

module.exports = command;
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;
6 changes: 5 additions & 1 deletion djs-bot/commands/music/stop.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,17 @@ const command = new SlashCommand()

const status = playerUtil.stop(player);

interaction.reply({
const ret = await interaction.reply({
embeds: [
new EmbedBuilder()
.setColor(client.config.embedColor)
.setDescription(`:wave: | **Bye Bye!**`),
],
fetchReply: true
});

if (ret) setTimeout(() => ret.delete().catch(client.warn), 20000);
return ret;
});

module.exports = command;

0 comments on commit fcf9113

Please sign in to comment.