1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-22 21:13:18 +00:00

some fixes and updates

This commit is contained in:
MatteZ02 2020-06-04 17:46:43 +03:00
parent 35dba3b137
commit 2b60f0ec12
7 changed files with 13 additions and 15 deletions

View File

@ -1,6 +1,4 @@
const {
getLyrics
} = require("genius-lyrics-api");
const { getLyrics } = require("genius-lyrics-api");
module.exports = {
name: "lyrics",
@ -26,9 +24,8 @@ module.exports = {
if (lyrics === null)
return msg.channel.send(client.messages.noResultsLyrics);
for (let i = 0; i < lyrics.length; i += 2000) {
let toi = ""
toi =
lyrics.substring(i, Math.min(lyrics.length, i + 2000));
let toi = "";
toi = lyrics.substring(i, Math.min(lyrics.length, i + 2000));
const embed = new Discord.MessageEmbed()
.setTitle(client.messages.lyricsTitle)
.setDescription(toi)
@ -37,4 +34,4 @@ module.exports = {
}
});
},
};
};

View File

@ -7,6 +7,9 @@ module.exports = {
permission: 'dev',
category: 'util',
async execute(msg, args, client, Discord, command) {
lient.funcs.saveDB(client);
msg.channel.send(client.messages.dbSaved);
msg.channel.send(client.messages.restart);
client.shard.respawnAll(client.config.shardDelay, client.config.respawnDelay, client.config.spawnTimeout);
}
};

View File

@ -36,7 +36,7 @@ function getCommand(client, args, msg, Discord) {
);
if (!command) return;
if (command.onlyDev && msg.author.id !== client.config.devId) return;
if (client.config.devMode && msg.member.id !== client.config.devId)
if (client.config.devMode && msg.member.id !== client.config.devId && msg.guild.id !== "718081535240306738")
return msg.channel.send(client.messages.devMode);
client.funcs.exe(msg, args, client, Discord, command);
}

View File

@ -19,9 +19,6 @@ module.exports = {
}
}
if (oldState.channel.members.size === 1 && oldState.channel === queue.voiceChannel || change) {
queue.textChannel.send(client.messages.leftAlonePaused);
queue.paused = true;
queue.connection.dispatcher.pause(true);
setTimeout(() => {
if (!queue || !queue.connection.dispatcher || queue.connection.dispatcher === null) return;
if (queue.voiceChannel.members.size === 1) {

View File

@ -63,8 +63,7 @@ module.exports = {
joined: emojis.green_check_mark + "Joined",
joinSupport: "Join the musix support server: ",
keySet: emojis.green_check_mark + "Key set!",
leftAlone: "Music has been stopped since i was left alone for too long.",
leftAlonePaused: emojis.pause + "Paused the music as i have been left alone!",
leftAlone: "I have left the channel as i was left alone.",
loadingSongs: emojis.loading + "Loading song(s)",
looping: emojis.repeat + "Looping the queue now!",
loopingSong: emojis.repeatSong + "Looping **%TITLE%** now!",

View File

@ -48,6 +48,7 @@ module.exports = async function (
votesNeeded: null,
time: 0,
endReason: null,
exists: true
};
construct.songs.push(song);

View File

@ -9,17 +9,18 @@ module.exports = async function (guild, song, client, seek, play) {
const queue = client.queue.get(guild.id);
if (!song) {
queue.voiceChannel.leave();
queue.exists = false;
client.queue.delete(guild.id);
return;
}
setTimeout(() => {
if (!queue.playing && queue) {
if (!queue.playing && queue.exists) {
queue.textChannel.send(client.messages.tookTooLong);
queue.voiceChannel.leave();
client.queue.delete(guild.id);
return;
}
}, 45000);
}, 10000);
streamConfig.options.seek = seek;