Starting work for new help message

This commit is contained in:
= 2021-07-18 14:56:45 -04:00
parent 50f8bfe619
commit b66c545500
5 changed files with 44 additions and 2 deletions

View File

@ -1,6 +1,6 @@
const functions = require('../functions');
const giphy = require('giphy-api')(process.env.giphyAPIKey);
module.exports = {
name: 'gif',
description: 'Send a GIF',

View File

@ -6,6 +6,20 @@ module.exports = {
const { commands } = message.client;
if (!file.name) {
// const helpStructure = {
// commands = [
// {
// name: commandName,
// aliases: commandAliases,
// description: commandDescription,
// usage: commandUsage,
// cooldown: commandCooldown
// }
// ]
// };
data.push('Here\'s a list of all my commands:');
data.push(commands.map(command => command.name).join(', '));
data.push('\nYou can send `[command name].help` to get info on a specific command!');

9
commands/mapcommands.js Normal file
View File

@ -0,0 +1,9 @@
const functions = require('../functions.js');
module.exports = {
name: 'mapcommands',
description: '',
execute(message, file) {
console.log(functions.mapCommands(message.client));
}
}

View File

@ -20,7 +20,8 @@
"weather",
"oldgif",
"newgif",
"newpng"
"newpng",
"mapcommands"
],
"emoji": {
"joint": "<:joint:862082955902976000>",

View File

@ -115,5 +115,23 @@ module.exports = {
.setTitle()
.setTimestamp()
.setFooter(`@${author.username}#${author.discriminator}`);
},
mapCommands(client) {
const { commands } = client;
// return new Promise((resolve, reject) => {
// let commandMap = []
// for (const [key, value] of commands.map()) {
// // commandMap.push({
// // name: command.name,
// // aliases: command.aliases,
// // description: command.description,
// // usage: command.usage,
// // cooldown: 0 // Set to 0 for now for the sake of simple code, will add cooldowns later
// // });
// }
// });
for (const entry of commands.map(command => [command.name, command.description, command.syntax])) {
console.log(entry);
}
}
}