mirror of
https://github.com/musix-org/musix-oss
synced 2024-12-23 00:23:17 +00:00
Chore update 3.8
This commit is contained in:
parent
ba3d17bb2a
commit
5a77443df6
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "musix",
|
||||
"version": "3.7.2",
|
||||
"version": "3.8.0",
|
||||
"description": "V3 for Musix the discord music bot",
|
||||
"main": "./index.js",
|
||||
"scripts": {
|
||||
|
@ -12,6 +12,5 @@ module.exports = {
|
||||
.setURL(client.config.invite)
|
||||
.setColor(client.config.embedColor)
|
||||
msg.channel.send(embed);
|
||||
msg.channel.send(client.messages.joinSupport + client.config.supportServer);
|
||||
}
|
||||
};
|
@ -49,6 +49,7 @@ module.exports = {
|
||||
const playlistId = url.split("/playlist/")[1].split("?")[0];
|
||||
spotify.getPlaylist(playlistId).then(
|
||||
async function (data) {
|
||||
console.log(data.body)
|
||||
searchPlaylist(data, client, msg, voiceChannel);
|
||||
},
|
||||
function (err) {
|
||||
@ -115,8 +116,7 @@ module.exports = {
|
||||
return lmsg.edit(message);
|
||||
} else {
|
||||
ytsr(
|
||||
searchString,
|
||||
{
|
||||
searchString, {
|
||||
limit: 5,
|
||||
},
|
||||
function (err, res) {
|
||||
@ -154,24 +154,21 @@ async function searchPlaylist(data, client, msg, voiceChannel) {
|
||||
const track = await data.body.tracks.items[i].track;
|
||||
await client.funcs.sleep(250);
|
||||
ytsr(
|
||||
`${track.artists[0].name} ${track.name} audio`,
|
||||
{
|
||||
`${track.artists[0].name} ${track.name} audio`, {
|
||||
limit: 5,
|
||||
},
|
||||
async function (err, res) {
|
||||
if (err) return console.log(err);
|
||||
if (!res.items[0]) {
|
||||
ytsr(
|
||||
`${track.artists[0].name} ${track.name} lyrics`,
|
||||
{
|
||||
`${track.artists[0].name} ${track.name} lyrics`, {
|
||||
limit: 5,
|
||||
},
|
||||
async function (err, res) {
|
||||
if (err) return console.log(err);
|
||||
if (!res.items[0]) {
|
||||
ytsr(
|
||||
`${track.artists[0].name} ${track.name}`,
|
||||
{
|
||||
`${track.artists[0].name} ${track.name}`, {
|
||||
limit: 5,
|
||||
},
|
||||
async function (err, res) {
|
||||
@ -244,24 +241,21 @@ async function searchAlbum(data, client, msg, voiceChannel) {
|
||||
const track = await data.body.items[i];
|
||||
await client.funcs.sleep(250);
|
||||
ytsr(
|
||||
`${track.artists[0].name} ${track.name} audio`,
|
||||
{
|
||||
`${track.artists[0].name} ${track.name} audio`, {
|
||||
limit: 5,
|
||||
},
|
||||
async function (err, res) {
|
||||
if (err) return console.log(err);
|
||||
if (!res.items[0]) {
|
||||
ytsr(
|
||||
`${track.artists[0].name} ${track.name} lyrics`,
|
||||
{
|
||||
`${track.artists[0].name} ${track.name} lyrics`, {
|
||||
limit: 5,
|
||||
},
|
||||
async function (err, res) {
|
||||
if (err) return console.log(err);
|
||||
if (!res.items[0]) {
|
||||
ytsr(
|
||||
`${track.artists[0].name} ${track.name}`,
|
||||
{
|
||||
`${track.artists[0].name} ${track.name}`, {
|
||||
limit: 5,
|
||||
},
|
||||
async function (err, res) {
|
||||
@ -337,24 +331,21 @@ async function searchSong(data, client, msg, voiceChannel) {
|
||||
const track = await data.body.tracks.items[i].track;
|
||||
await client.funcs.sleep(250);
|
||||
ytsr(
|
||||
`${track.artists[0].name} ${track.name} audio`,
|
||||
{
|
||||
`${track.artists[0].name} ${track.name} audio`, {
|
||||
limit: 5,
|
||||
},
|
||||
async function (err, res) {
|
||||
if (err) return console.log(err);
|
||||
if (!res.items[0]) {
|
||||
ytsr(
|
||||
`${track.artists[0].name} ${track.name} lyrics`,
|
||||
{
|
||||
`${track.artists[0].name} ${track.name} lyrics`, {
|
||||
limit: 5,
|
||||
},
|
||||
async function (err, res) {
|
||||
if (err) return console.log(err);
|
||||
if (!res.items[0]) {
|
||||
ytsr(
|
||||
`${track.artists[0].name} ${track.name}`,
|
||||
{
|
||||
`${track.artists[0].name} ${track.name}`, {
|
||||
limit: 5,
|
||||
},
|
||||
async function (err, res) {
|
||||
|
@ -11,7 +11,7 @@ module.exports = {
|
||||
if (client.funcs.check(client, msg, command)) {
|
||||
if (!queue.paused) return msg.channel.send(client.messages.notPaused);
|
||||
queue.paused = false;
|
||||
queue.connection.dispatcher.resume(true);
|
||||
queue.connection.dispatcher.resume();
|
||||
return msg.channel.send(client.messages.resumed);
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ module.exports = {
|
||||
queue.exists = false;
|
||||
}
|
||||
if (msg.guild.voice.channel) msg.guild.voice.channel.leave();
|
||||
client.queue.delete(guild.id);
|
||||
client.queue.delete(msg.guild.id);
|
||||
return msg.channel.send(client.messages.stop);
|
||||
}
|
||||
queue.songs = [];
|
||||
|
@ -6,6 +6,9 @@ module.exports = function (client) {
|
||||
require(`./msg.js`).execute(client, msg, Discord);
|
||||
}).on('guildCreate', (guild) => {
|
||||
require(`./guildCreate.js`).execute(client, guild);
|
||||
})
|
||||
.on('guildDelete', (guild) => {
|
||||
require(`./guildDelete.js`).execute(client, guild);
|
||||
}).on('voiceStateUpdate', (oldState, newState) => {
|
||||
require(`./voiceStateUpdate.js`).execute(client, oldState, newState);
|
||||
}).on('error', (error) => {
|
||||
|
@ -53,6 +53,7 @@ function findSimilar(client, queue, prevSongs, guild) {
|
||||
youtubeAPIKey: client.config.api_key,
|
||||
},
|
||||
async function (err, songs) {
|
||||
console.log(songs)
|
||||
if (err) {
|
||||
console.log(err.message);
|
||||
return queue.textChannel.send(client.messages.error);
|
||||
|
@ -29,7 +29,6 @@ module.exports = class extends Client {
|
||||
credential: admin.credential.cert(serviceAccount),
|
||||
});
|
||||
this.commands = new Collection();
|
||||
this.commandAliases = new Collection();
|
||||
this.settingCmd = new Collection();
|
||||
this.queue = new Map();
|
||||
this.funcs = {};
|
||||
@ -56,7 +55,6 @@ module.exports = class extends Client {
|
||||
const command = require(`../commands/${file}`);
|
||||
command.uses = 0;
|
||||
this.commands.set(command.name, command);
|
||||
this.commandAliases.set(command.alias, command);
|
||||
}
|
||||
const settingFiles = fs
|
||||
.readdirSync(path.join(path.dirname(__dirname), "commands/settings"))
|
||||
|
@ -22,8 +22,8 @@ module.exports = {
|
||||
secondary_test_channel: "570531724002328577",
|
||||
devId: "360363051792203779",
|
||||
embedColor: "#b50002",
|
||||
invite: "https://discordapp.com/oauth2/authorize?client_id=607266889537945605&permissions=3427328&scope=bot",
|
||||
supportServer: "https://discord.gg/rvHuJtB",
|
||||
invite: "https://musix-web.herokuapp.com/releases",
|
||||
supportServer: "https://musix-web.herokuapp.com/discord",
|
||||
devMode: false,
|
||||
api: false,
|
||||
saveDB: true,
|
||||
@ -40,7 +40,7 @@ module.exports = {
|
||||
djrole: null,
|
||||
startPlaying: true,
|
||||
bass: 1,
|
||||
autoPlay: false,
|
||||
autoPlay: true,
|
||||
};
|
||||
|
||||
module.exports.streamConfig = {
|
||||
|
@ -69,7 +69,7 @@ module.exports = {
|
||||
idOrMentionChannel: emojis.redx + "Please provide a channel id or mention a channel!",
|
||||
invalidGuild: emojis.redx + "Invalid guild id!",
|
||||
invalidSpotifyUrl: emojis.redx + "That url cannot be played! If you believe this is a mistake please contact support!",
|
||||
inviteTitle: "Invite Musix to your Discord server!",
|
||||
inviteTitle: "Invite a release of Musix to your discord server!",
|
||||
joined: emojis.green_check_mark + "Joined",
|
||||
joinSupport: "Join the musix support server: ",
|
||||
keySet: emojis.green_check_mark + "Key set!",
|
||||
|
@ -3,7 +3,7 @@ module.exports = function (msg, args, client, Discord, command) {
|
||||
if (!permissions.has("EMBED_LINKS"))
|
||||
return msg.channel.send(client.messages.noPermsEmbed);
|
||||
if (!permissions.has("USE_EXTERNAL_EMOJIS"))
|
||||
return msg.channel.send(client.noPermsUseExternalEmojis);
|
||||
return msg.channel.send(client.messages.noPermsUseExternalEmojis);
|
||||
if (
|
||||
command.category === "music" &&
|
||||
client.global.db.guilds[msg.guild.id].blacklist.includes(msg.channel.id)
|
||||
|
Loading…
Reference in New Issue
Block a user