Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const botConfig = require("../botConfig.json");
- module.exports.run = async (client, message, args) => {
- try {
- var prefix = botConfig.prefix;
- var response = "**Bot commands**\r\n\n";
- var general = "**__Algemeen__**\r\n";
- var info = "\n**__Informatie__**\r\n";
- client.commands.forEach(command => {
- switch (command.help.category) {
- case "general":
- general += `${prefix}${command.help.name} - ${command.help.description}\r\n`
- break;
- case "info":
- info += `${prefix}${command.help.name} - ${command.help.description}\r\n`
- break;
- }
- });
- response += general + info;
- message.author.send(response).then(() => {
- message.reply("Alle commands kan je vinden in je privé berichten!");
- }).catch(() => {
- message.reply("Je privé berichten zijn uitgeschakeld, je hebt dus geen hulp ontvangen.");
- })
- }
- catch (error) {
- message.reply("Er is iets mis gelopen");
- }
- }
- module.exports.help = {
- name: "help",
- category: "info",
- description: "Geeft dit menu"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement