parent
99dadc5b34
commit
4b6e61f066
@ -0,0 +1,20 @@ |
||||
const Discord = require('discord.js'); |
||||
const spotify = require('swwrap'); |
||||
|
||||
module.exports = { |
||||
name: "", |
||||
aliases: [], |
||||
meta: { |
||||
category: '', |
||||
description: "", |
||||
syntax: '` <>`', |
||||
extra: null |
||||
}, |
||||
help: new Discord.MessageEmbed() |
||||
.setTitle("Help -> ") |
||||
.setDescription("") |
||||
.addField("Syntax", "``"), |
||||
async execute(message, msg, args, cmd, prefix, mention, client) { |
||||
if (!args.length) {return message.channel.send(`Syntax: \`${prefix}\``);} |
||||
} |
||||
}; |
@ -0,0 +1,25 @@ |
||||
const Discord = require('discord.js'); |
||||
|
||||
module.exports = { |
||||
name: "commands", |
||||
aliases: ['cmds', 'commandlist', 'cmdlist'], |
||||
meta: { |
||||
category: 'Misc', |
||||
description: "Shows a list of my commands", |
||||
syntax: '`commands`', |
||||
extra: null |
||||
}, |
||||
help: "Shows a list of all my commands", |
||||
async execute(message, msg, args, cmd, prefix, mention, client) { |
||||
let categories = []; |
||||
Array.from(client.commands.values()).forEach(c => {console.log(c); if (!categories.includes(c.meta ? c.meta.category : 'Uncategorized')) {categories.push(c.meta ? c.meta.category : 'Uncategorized');}}); |
||||
let ce = new Discord.MessageEmbed() |
||||
.setTitle("Commands") |
||||
.setDescription(`You can use \`${prefix}help\` on any command to get more help on it.`) |
||||
.setColor('dc134c') |
||||
.setFooter("Natsuki", client.user.avatarURL()) |
||||
.setTimestamp(); |
||||
categories.forEach(category => ce.addField(category, Array.from(client.commands.values()).filter(command => command.meta ? command.meta.category === category : category === "Uncategorized").map(cmd => `\`${cmd.name}\``).join(', '))); |
||||
return message.channel.send(ce); |
||||
} |
||||
}; |
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue