Advertisement
jensie1996

Help command

Jan 9th, 2019
1,055
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. var commandsList = [];
  2.  
  3. bot.commands.forEach(command => {
  4.  
  5. var item = {
  6.  
  7. name: command.help.name,
  8. description: command.help.description,
  9. // category: command.help.category
  10.  
  11. }
  12.  
  13. commandsList.push(item);
  14.  
  15. });
  16.  
  17. // console.log(commandsList);
  18.  
  19. var prefix = botConfig.prefix;
  20. var response = "";
  21.  
  22. for (var i = 0; i < commandsList.length; i++) {
  23.  
  24. response += `${prefix}${commandsList[i]["name"]} - ${commandsList[i]["description"]} \r\n`;
  25.  
  26. }
  27.  
  28. message.author.send(response).then(() => {
  29.  
  30. message.channel.send("Al de commando's staan in je privé berichten! :mailbox_with_mail:");
  31.  
  32. }).catch(() => {
  33.  
  34. message.channel.send("Je privé berichten staan uit geschakeld, je hebt geen hulp ontvangen");
  35.  
  36. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement