Made image API node chooser sort by job amount instead of CPU usage, added soundreload
This commit is contained in:
parent
55da0db479
commit
c2bd68263b
5 changed files with 70 additions and 73 deletions
16
commands/soundreload.js
Normal file
16
commands/soundreload.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
const soundPlayer = require("../utils/soundplayer.js");
|
||||
|
||||
exports.run = async (message) => {
|
||||
if (message.author.id !== process.env.OWNER) return `${message.author.mention}, only the bot owner can reload Lavalink!`;
|
||||
const soundStatus = await soundPlayer.checkStatus();
|
||||
if (!soundStatus) {
|
||||
const length = await soundPlayer.connect();
|
||||
return `Successfully connected to ${length} Lavalink node(s).`;
|
||||
} else {
|
||||
return `${message.author.mention}, I couldn't connect to any Lavalink nodes!`;
|
||||
}
|
||||
};
|
||||
|
||||
exports.aliases = ["lava", "lavalink", "lavaconnect", "soundconnect"];
|
||||
exports.category = 8;
|
||||
exports.help = "Attempts to reconnect to all available Lavalink nodes";
|
Loading…
Add table
Add a link
Reference in a new issue