Added new help command and command metadata, various changes
This commit is contained in:
parent
c9f0ff3827
commit
3d225f6547
97 changed files with 456 additions and 155 deletions
|
@ -2,3 +2,4 @@ const { Collection } = require("eris");
|
|||
|
||||
exports.commands = new Collection();
|
||||
exports.aliases = new Collection();
|
||||
exports.info = new Collection();
|
|
@ -9,7 +9,11 @@ exports.load = async (command) => {
|
|||
if (props.requires === "mashape" && process.env.MASHAPE === "") return logger.log("info", `Mashape/RapidAPI info not provided in config, skipped loading command ${command}...`);
|
||||
if (props.requires === "twitter" && process.env.TWITTER === "false") return logger.log("info", `Twitter bot disabled, skipped loading command ${command}...`);
|
||||
collections.commands.set(command.split(".")[0], props.run);
|
||||
// add each alias to
|
||||
collections.info.set(command.split(".")[0], {
|
||||
category: props.category,
|
||||
description: props.help,
|
||||
aliases: props.aliases
|
||||
});
|
||||
if (props.aliases) {
|
||||
props.aliases.forEach(alias => {
|
||||
collections.aliases.set(alias, command.split(".")[0]);
|
||||
|
|
|
@ -18,9 +18,6 @@ module.exports = async (sound, message) => {
|
|||
playingMessage.delete();
|
||||
logger.error(error);
|
||||
});
|
||||
connection.on("warn", (warn) => {
|
||||
logger.warn(warn);
|
||||
});
|
||||
connection.once("end", () => {
|
||||
voiceChannel.leave();
|
||||
playingMessage.delete();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue