help.js 483 B

123456789101112131415161718
  1. const db = require("../db.js");
  2. const commands = {
  3. "help": msg => {
  4. let guides = db
  5. .get("guides")
  6. .map(g => g.name)
  7. .reduce((p, c) => `${p}\n${c}`, "")
  8. .value();
  9. msg.channel.send(
  10. `Hello! I am NoctBot! I have answers for the most common C(O)M-related questions.\nJust ping me with one of the following keywords:\n\`\`\`${guides}\`\`\``
  11. );
  12. }
  13. };
  14. module.exports = {
  15. commands: commands
  16. };