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

Updated command aliases

This commit is contained in:
MatteZ02 2020-05-15 19:05:39 +03:00
parent b76af649f2
commit 256585293e
33 changed files with 73 additions and 65 deletions

View File

@ -1,6 +1,6 @@
{
"name": "musix",
"version": "3.4.0",
"version": "3.4.1",
"description": "V3 for Musix the discord music bot",
"main": "./index.js",
"scripts": {
@ -46,4 +46,4 @@
"ytdl-core": "^2.1.2",
"zlib-sync": "^0.1.6"
}
}
}

View File

@ -1,7 +1,7 @@
module.exports = {
name: "bass",
description: "Bassboost command.",
alias: "none",
description: "Boost the bass in your music!",
alias: ["none"],
usage: "<bass>",
cooldown: 5,
onlyDev: false,
@ -32,4 +32,4 @@ module.exports = {
return msg.channel.send(message);
}
},
};
};

View File

@ -1,6 +1,6 @@
module.exports = {
name: 'cmduses',
alias: 'none',
alias: ["none"],
usage: '',
description: 'list all commands and how many times they\'ve been used',
onlyDev: true,

View File

@ -1,8 +1,8 @@
module.exports = {
name: 'end',
alias: 'e',
alias: ["none"],
usage: '',
description: 'end the queue',
description: 'just end it',
onlyDev: true,
permission: 'dev',
category: 'util',
@ -10,4 +10,4 @@ module.exports = {
client.queue.delete(msg.guild.id);
msg.channel.send(client.messages.queueDeleted);
}
};
};

View File

@ -1,6 +1,6 @@
module.exports = {
name: 'eval',
alias: 'e',
alias: ["none"],
usage: '<code>',
description: 'Evaluation command. DEV ONLY!',
onlyDev: true,
@ -26,4 +26,4 @@ module.exports = {
.setDescription(`Input: \`\`\`js\n${input.replace(/; /g, ';').replace(/;/g, ';\n')}\n\`\`\`\nOutput: \`\`\`\n${output}\n\`\`\``);
return msg.channel.send(embed);
},
};
};

View File

@ -1,6 +1,6 @@
module.exports = {
name: 'help',
alias: 'h',
alias: ["h"],
usage: '<command(opt)>',
description: 'See the help for Musix.',
onlyDev: false,
@ -13,7 +13,7 @@ module.exports = {
const embed = new Discord.MessageEmbed()
.setTitle(`${client.global.db.guilds[msg.guild.id].prefix}${command.name} ${command.usage}`)
.setDescription(command.description)
.setFooter(`${client.messages.helpCmdFooter} \`${command.alias}\``)
.setFooter(`${client.messages.helpCmdFooter} \`${command.alias.map(a => `${a}, `)}\``)
.setColor(client.config.embedColor)
msg.channel.send(embed);
} else {
@ -35,4 +35,4 @@ module.exports = {
msg.channel.send(embed);
}
}
};
};

View File

@ -1,6 +1,6 @@
module.exports = {
name: 'invite',
alias: 'i',
alias: ["i"],
usage: '',
description: 'Invite Musix.',
onlyDev: false,

View File

@ -1,8 +1,8 @@
module.exports = {
name: 'join',
alias: 'j',
alias: ["j"],
usage: '',
description: 'Make Musix join the channel your channel',
description: 'Make Musix join your voice channel.',
onlyDev: true,
permission: 'none',
category: 'util',

View File

@ -1,6 +1,6 @@
module.exports = {
name: 'loop',
alias: 'none',
alias: [],
usage: '',
description: 'loop the queue.',
onlyDev: false,
@ -18,4 +18,4 @@ module.exports = {
}
}
}
};
};

View File

@ -1,6 +1,6 @@
module.exports = {
name: 'loopsong',
alias: 'loops',
alias: ["none"],
usage: '',
description: 'loop the currently playing song.',
onlyDev: false,
@ -20,4 +20,4 @@ module.exports = {
}
}
}
};
};

View File

@ -1,8 +1,10 @@
const { getLyrics } = require("genius-lyrics-api");
const {
getLyrics
} = require("genius-lyrics-api");
module.exports = {
name: "lyrics",
alias: "l",
alias: ["l"],
usage: "<song>",
description: "see the lyrics for a song",
onlyDev: false,
@ -30,4 +32,4 @@ module.exports = {
msg.channel.send(embed);
});
},
};
};

View File

@ -1,8 +1,8 @@
module.exports = {
name: "nigthcore",
alias: "nc",
alias: ["nc"],
usage: "<true/false>",
description: "Change nigthcore on/off",
description: "Change nigthcore audio modifier on/off",
onlyDev: false,
permission: "MANAGE_MESSAGES",
category: "music",
@ -23,4 +23,4 @@ module.exports = {
return msg.channel.send(message);
}
},
};
};

View File

@ -1,6 +1,6 @@
module.exports = {
name: "nowplaying",
alias: "np",
alias: ["np", "playing"],
usage: "",
description: "See the currently playing song position and length.",
onlyDev: false,
@ -47,4 +47,4 @@ module.exports = {
);
return msg.channel.send(embed);
},
};
};

View File

@ -1,6 +1,6 @@
module.exports = {
name: 'pause',
alias: 'none',
alias: ["none"],
usage: '',
description: 'Pause the currently playing music.',
onlyDev: false,
@ -15,4 +15,4 @@ module.exports = {
return msg.channel.send(client.messages.paused);
}
}
};
};

View File

@ -5,7 +5,7 @@ const ytdl = require("ytdl-core")
module.exports = {
name: "play",
alias: "p",
alias: ["p", "music"],
usage: "<song name>",
description: "Play some music.",
onlyDev: false,

View File

@ -1,6 +1,6 @@
module.exports = {
name: 'previous',
alias: 'prev',
alias: ["prev", "return", "back"],
usage: '',
description: 'Play the previous song.',
onlyDev: false,

View File

@ -1,6 +1,6 @@
module.exports = {
name: 'queue',
alias: 'q',
alias: ["q", "list", "ls", "songs"],
usage: '',
description: 'See the queue.',
onlyDev: false,

View File

@ -1,6 +1,6 @@
module.exports = {
name: "remove",
alias: "rm",
alias: ["rm", "delete", "del"],
usage: "<song pos>",
description: "Remove a song from the queue",
onlyDev: false,

View File

@ -1,6 +1,6 @@
module.exports = {
name: 'replay',
alias: 'none',
alias: ["rp"],
usage: '',
description: 'Replay the currently playing song.',
onlyDev: false,

View File

@ -1,6 +1,6 @@
module.exports = {
name: 'restart',
alias: 'none',
alias: ["none"],
usage: '',
description: 'restart all shards',
onlyDev: true,
@ -9,4 +9,4 @@ module.exports = {
async execute(msg, args, client, Discord, command) {
client.shard.respawnAll(client.config.shardDelay, client.config.respawnDelay, client.config.spawnTimeout);
}
};
};

View File

@ -1,6 +1,6 @@
module.exports = {
name: 'resume',
alias: 'none',
alias: ["continue"],
usage: '',
description: 'Resume the paused music.',
onlyDev: false,
@ -15,4 +15,4 @@ module.exports = {
return msg.channel.send(client.messages.resumed);
}
}
};
};

View File

@ -1,6 +1,6 @@
module.exports = {
name: 'savedb',
alias: 'save',
alias: ["none"],
usage: '',
description: 'save the database',
onlyDev: true,
@ -10,4 +10,4 @@ module.exports = {
client.funcs.saveDB(client);
msg.channel.send(client.messages.dbSaved);
}
};
};

View File

@ -3,7 +3,7 @@ const he = require('he');
module.exports = {
name: 'search',
alias: 'sr',
alias: ["sr", "find"],
usage: '<search word(s)>',
description: 'Search the top 10 queryes and choose one.',
onlyDev: false,

View File

@ -1,6 +1,6 @@
module.exports = {
name: "seek",
alias: "none",
alias: ["none"],
usage: "<point in song (seconds)>",
description: "Seek to a specific point in the currently playing song.",
onlyDev: false,
@ -33,4 +33,4 @@ module.exports = {
client.funcs.end(client, msg, pos, command);
}
},
};
};

View File

@ -1,6 +1,6 @@
module.exports = {
name: "settings",
alias: "pref",
alias: ["options", "ops", "preferences"],
usage: "<setting> <value(opt)>",
description: "Change the server settings for Musix.",
onlyDev: false,

View File

@ -1,6 +1,6 @@
module.exports = {
name: 'shuffle',
alias: 'none',
alias: ["none"],
usage: '',
description: 'Shuffle the queue.',
onlyDev: false,

View File

@ -1,6 +1,6 @@
module.exports = {
name: "skip",
alias: "s",
alias: ["s", "next"],
usage: "",
description: "Skip the currently playing song.",
onlyDev: false,
@ -33,12 +33,14 @@ module.exports = {
}
},
};
function skipSong(queue, msg, client) {
msg.channel.send(client.messages.skipped);
queue.endReason = "skip";
queue.time = 0;
queue.connection.dispatcher.end();
}
function vote(queue, msg, client) {
queue.votesNeeded = Math.floor(queue.voiceChannel.members.size / 2);
queue.votesNeeded.toFixed();
@ -59,4 +61,4 @@ function vote(queue, msg, client) {
} else {
return skipSong(queue, msg, client);
}
}
}

View File

@ -1,6 +1,6 @@
module.exports = {
name: "skipto",
alias: "st",
alias: ["st"],
usage: "<point in queue>",
description: "Skip to a point in the queue",
onlyDev: false,

View File

@ -1,6 +1,6 @@
module.exports = {
name: "soundcloud",
alias: "sc",
alias: ["none"],
usage: "",
description: "",
onlyDev: true,
@ -10,14 +10,19 @@ module.exports = {
if (!args[1]) return msg.channel.send(client.messages.noQuery);
const SoundCloud = require("soundcloud-api-client");
const key = client.config.soundCloud_api_key;
const soundcloud = new SoundCloud({ key });
const soundcloud = new SoundCloud({
key
});
const q = "live mix";
const genres = ["house", "tech-house", "techno"].join(",");
soundcloud
.get("/tracks", { q, genres })
.get("/tracks", {
q,
genres
})
.then((tracks) => console.log(tracks))
.catch((e) => console.error(e));
},
};
};

View File

@ -1,6 +1,6 @@
module.exports = {
name: 'status',
alias: 'stats',
alias: ["stats", "info"],
usage: '',
description: 'See the current status for Musix.',
onlyDev: false,
@ -23,4 +23,4 @@ module.exports = {
return msg.channel.send(embed);
});
}
};
};

View File

@ -1,7 +1,7 @@
module.exports = {
name: 'stop',
description: 'Stop command.',
alias: 'none',
description: 'Stop the music and clear the queue.',
alias: ["none"],
usage: '',
onlyDev: false,
permission: 'MANAGE_CHANNELS',
@ -16,4 +16,4 @@ module.exports = {
msg.channel.send(client.messages.stop)
}
}
};
};

View File

@ -1,7 +1,7 @@
module.exports = {
name: 'volume',
description: 'Volume command.',
alias: 'none',
alias: ["none"],
usage: '<volume>',
cooldown: 5,
onlyDev: false,
@ -20,4 +20,4 @@ module.exports = {
return msg.channel.send(`${client.messages.setVolume}**${volume}**`);
}
}
};
};

View File

@ -32,12 +32,11 @@ function getCommand(client, args, msg, Discord) {
const command =
client.commands.get(commandName) ||
client.commands.find(
(cmd) => cmd.aliases && cmd.aliases.includes(commandName)
) ||
client.commandAliases.get(commandName);
(cmd) => cmd.alias && cmd.alias.includes(commandName)
);
if (!command) return;
if (command.onlyDev && msg.author.id !== client.config.devId) return;
if (client.config.devMode && msg.member.id !== client.config.devId)
return msg.channel.send(client.messages.devMode);
client.funcs.exe(msg, args, client, Discord, command);
}
}