mirror of
https://github.com/musix-org/musix-oss
synced 2024-11-10 02:00:20 +00:00
Update 3.3
This commit is contained in:
parent
07fd7df141
commit
1158d32910
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "musix",
|
||||
"version": "3.2.2",
|
||||
"version": "3.3.0",
|
||||
"description": "V3 for Musix the discord music bot",
|
||||
"main": "./index.js",
|
||||
"scripts": {
|
||||
@ -45,4 +45,4 @@
|
||||
"ytdl-core": "^2.1.0",
|
||||
"zlib-sync": "^0.1.6"
|
||||
}
|
||||
}
|
||||
}
|
18
src/commands/previous.js
Normal file
18
src/commands/previous.js
Normal file
@ -0,0 +1,18 @@
|
||||
module.exports = {
|
||||
name: 'previous',
|
||||
alias: 'prev',
|
||||
usage: '',
|
||||
description: 'Play the previous song.',
|
||||
onlyDev: false,
|
||||
permission: 'MANAGE_MESSAGES',
|
||||
category: 'music',
|
||||
async execute(msg, args, client, Discord, command) {
|
||||
const queue = client.queue.get(msg.guild.id)
|
||||
if (client.funcs.check(client, msg, command)) {
|
||||
if (queue.prevSongs.length < 1) return msg.channel.send(client.messages.noPreviousSongs);
|
||||
queue.endReason = "previous";
|
||||
queue.connection.dispatcher.end()
|
||||
msg.channel.send(client.messages.previousSong)
|
||||
}
|
||||
}
|
||||
};
|
16
src/commands/replay.js
Normal file
16
src/commands/replay.js
Normal file
@ -0,0 +1,16 @@
|
||||
module.exports = {
|
||||
name: 'replay',
|
||||
alias: 'none',
|
||||
usage: '',
|
||||
description: 'Replay the currently playing song.',
|
||||
onlyDev: false,
|
||||
permission: 'MANAGE_MESSAGES',
|
||||
category: 'music',
|
||||
async execute(msg, args, client, Discord, command) {
|
||||
const queue = client.queue.get(msg.guild.id);
|
||||
if (client.funcs.check(client, msg, command)) {
|
||||
queue.endReason = "replay";
|
||||
queue.connection.dispatcher.end()
|
||||
}
|
||||
}
|
||||
};
|
@ -20,11 +20,11 @@ module.exports = {
|
||||
return msg.channel.send(client.messages.noSongs);
|
||||
if (point < 0) return msg.channel.send(client.messages.cantSkipToCurrent);
|
||||
for (let i = 0; i < point; i++) {
|
||||
queue.songs.shift();
|
||||
queue.prevSongs.push(queue.songs.shift());
|
||||
}
|
||||
queue.endReason = "skipto";
|
||||
queue.time = 0;
|
||||
queue.connection.dispatcher.end();
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
@ -13,7 +13,10 @@ module.exports = async function (client, reason, guild) {
|
||||
queue.time = 0;
|
||||
queue.votes = 0;
|
||||
queue.voters = [];
|
||||
queue.songs.shift();
|
||||
if (reason !== "replay") {
|
||||
if (reason === "previous") queue.songs.unshift(queue.prevSongs.pop())
|
||||
if (reason !== "previous") queue.prevSongs.push(queue.songs.shift());
|
||||
}
|
||||
}
|
||||
client.funcs.play(guild, queue.songs[0], client, 0, true);
|
||||
};
|
||||
};
|
@ -21,7 +21,7 @@ module.exports = {
|
||||
embedColor: "#b50002",
|
||||
invite: "https://discordapp.com/oauth2/authorize?client_id=607266889537945605&permissions=3427328&scope=bot",
|
||||
supportServer: "https://discord.gg/rvHuJtB",
|
||||
devMode: false,
|
||||
devMode: true,
|
||||
api: false,
|
||||
saveDB: true,
|
||||
respawn: true,
|
||||
@ -37,4 +37,4 @@ module.exports = {
|
||||
djrole: null,
|
||||
startPlaying: true,
|
||||
bass: 1,
|
||||
};
|
||||
};
|
@ -6,6 +6,7 @@ module.exports = {
|
||||
megaPhone: "📣 ",
|
||||
notes: "<a:aNotes:674602408105476106>",
|
||||
pause: "<:pause:674685548610322462> ",
|
||||
previous: "<:reverse:705012312142119012> ",
|
||||
redx: "<:redx:674263474704220182> ",
|
||||
repeat: "<:repeat1:674685561377914892> ",
|
||||
repeatSong: "<:repeatsong:674685573419761716> ",
|
||||
@ -17,4 +18,4 @@ module.exports = {
|
||||
stop: "<:stop:674685626108477519> ",
|
||||
stopWatch: ":stopwatch: ",
|
||||
volumeHigh: "<:volumehigh:674685637626167307> ",
|
||||
};
|
||||
};
|
@ -92,6 +92,7 @@ module.exports = {
|
||||
"I cannot speak in your voice channel, make sure I have the proper permissions!",
|
||||
noPermsUseExternalEmojis: emojis.redx +
|
||||
"I cannot use external emojis, make sure I have the proper permissions!",
|
||||
noPreviousSongs: emojis.redx + "No previous songs!",
|
||||
noQuery: emojis.redx + "you need to use a link or search for a song!",
|
||||
noResults: emojis.redx + "I could not obtain any search results!",
|
||||
noResultsLyrics: emojis.redx + "I could not obtain any results!",
|
||||
@ -124,6 +125,7 @@ module.exports = {
|
||||
prefixMaxLength: "The prefix must be shorter or equal to 5 letters!",
|
||||
prefixSet: emojis.green_check_mark + "New prefix set to:",
|
||||
premiumState: "Premium status: ",
|
||||
previousSong: emojis.previous + "Previous",
|
||||
provideANumber: "Please provide a number ranging from 1-10 to select one of the search results.",
|
||||
provideASong: emojis.redx + "Please provide a song position in queue for me to remove!",
|
||||
queueDeleted: "Queue deleted!",
|
||||
|
@ -30,6 +30,7 @@ module.exports = async function (
|
||||
voiceChannel: voiceChannel,
|
||||
connection: null,
|
||||
songs: [],
|
||||
prevSongs: [],
|
||||
volume: client.global.db.guilds[msg.guild.id].defaultVolume,
|
||||
bass: client.global.db.guilds[msg.guild.id].bass,
|
||||
nigthCore: false,
|
||||
|
@ -1,5 +1,7 @@
|
||||
module.exports = async function (guild, song, client, seek, play) {
|
||||
const { Readable: ReadableStream } = require("stream");
|
||||
const {
|
||||
Readable: ReadableStream
|
||||
} = require("stream");
|
||||
const Discord = require("discord.js");
|
||||
const ytdl = require("ytdl-core");
|
||||
const streamConfig = require("../config/streamConfig.js");
|
||||
@ -75,4 +77,4 @@ module.exports = async function (guild, song, client, seek, play) {
|
||||
queue.textChannel.send(embed);
|
||||
}
|
||||
queue.playing = true;
|
||||
};
|
||||
};
|
Loading…
Reference in New Issue
Block a user