Halfbroken fixes

This commit is contained in:
Myx
2023-06-28 03:02:41 +02:00
parent 6a001604ab
commit f533e38333
18 changed files with 545 additions and 421 deletions

View File

@@ -1,34 +1,34 @@
const musicQueue = require("../musicQueue");
const musicQueue = require('../musicQueue');
async function enableLooping(interaction) {
await interaction.deferReply();
const guildId = interaction.guild.id;
musicQueue.enableLooping(guildId);
interaction.followUp("Enabled looping for the current queue.");
await interaction.deferReply();
const guildId = interaction.guild.id;
musicQueue.enableLooping(guildId);
interaction.followUp('Enabled looping for the current queue.');
}
async function unloopCommand(interaction) {
await interaction.deferReply();
const guildId = interaction.guild.id;
await interaction.deferReply();
const guildId = interaction.guild.id;
musicQueue.disableLooping(guildId);
interaction.followUp("Disabled looping for the current queue.");
musicQueue.disableLooping(guildId);
interaction.followUp('Disabled looping for the current queue.');
}
async function toggleLoopCommand(interaction) {
await interaction.deferReply();
const guildId = interaction.guild.id;
await interaction.deferReply();
const guildId = interaction.guild.id;
if (musicQueue.looping.has(guildId) && musicQueue.looping.get(guildId)) {
musicQueue.disableLooping(guildId, false);
interaction.followUp("Disabled looping for the current queue.");
} else {
musicQueue.enableLooping(guildId, true);
interaction.followUp("Enabled looping for the current queue.");
}
if (musicQueue.looping.has(guildId) && musicQueue.looping.get(guildId)) {
musicQueue.disableLooping(guildId, false);
interaction.followUp('Disabled looping for the current queue.');
} else {
musicQueue.enableLooping(guildId, true);
interaction.followUp('Enabled looping for the current queue.');
}
}
module.exports.toggleLoopCommand = toggleLoopCommand;
module.exports.unloopCommand = unloopCommand;
module.exports.enableLooping = enableLooping;
module.exports.enableLooping = enableLooping;