{"_id":"@demostanis.worlds/discord.js-commander","_rev":"2-a05b7e2750615d225d5e38501968d78f","name":"@demostanis.worlds/discord.js-commander","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@demostanis.worlds/discord.js-commander","version":"1.0.0","description":"Make your Discord bot commands look like Bash commands`","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"prepublishOnly":"node ./node_modules/@babel/core/lib/index.js src --out-dir lib"},"babel":{"presets":["@babel/preset-env"]},"repository":{"type":"git","url":"git+https://github.com/demostanis-worlds/discord.js-commander.git"},"keywords":["discord.js-commander","discord-commander","discord.js","discord","commander"],"author":{"name":"demostanis"},"license":"MIT","bugs":{"url":"https://github.com/demostanis-worlds/discord.js-commander/issues"},"homepage":"https://github.com/demostanis-worlds/discord.js-commander#readme","dependencies":{"@babel/core":"^7.5.5","@babel/preset-env":"^7.5.5","discord.js":"^11.5.1","parse-command":"0.0.102","tiny-timer":"^1.4.0"},"gitHead":"fc04efbe691015928b7c2be27683b57b54e7ce64","_id":"@demostanis.worlds/discord.js-commander@1.0.0","_nodeVersion":"10.14.1","_npmVersion":"6.10.0","dist":{"integrity":"sha512-tZ/ZHRTSEnDC3OcLk0tOhI038uMwAKNNAFCIlTAV83K6ciN8jjttek48gK6himitRitdRcG4X2VZyufZKAXTuQ==","shasum":"119052b59b220fc01cb6f1c2f1f198f5c0891273","tarball":"https://registry.npmjs.org/@demostanis.worlds/discord.js-commander/-/discord.js-commander-1.0.0.tgz","fileCount":2,"unpackedSize":3715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdWmpMCRA9TVsSAnZWagAAkmMP/jvnJYVf38vlS0GHGcBH\nl4zDqSZTaI3jpcg43ZMLvxsKbkJzGIXghJxPrjO49KKqiBpHa2vzy3j+LXHn\nszaUBTdL6zO92GcRQd0ElaPYaZOvnH0CDRxrhlImMa069rALi6/50Yn3eJlj\n5f0nIHmtihSQAs5uPsVdFuB1c0jRetHJTQBcxNTeREC5ZcTJIScVIY1A7Pim\nyLCvP+WsKG/vu6e1yaI3bFkZoMLwD0bHj8hb8hXK5dXFlP9gEm6M6+BXGzsY\na5t5JuSs/ANC7gO2RBaNeiH4tqwaXRGvoNMFEUNwciz64sLKTbDP9ztoPYRv\nqRBaexS1SiTIV4vAadlS22OmQ9jj+Nyg3KtznJW0YiIYF+u+a5eNlIqJJjFG\nIe1p/pjzMLVVKuP+N5hNbh9hNI7BxREhyL6QuTxhhzH6SxICeL13j12+FKUe\nY3SYutjhIIlUYkO7TNUAY53prHxFk7FJAEFvBTd63Kei2S/Vq6Z7ALQMDiiH\n3+cfytpp4OfVsDopEJbBg5idgivyEH4IRg3fFCRgYyTuJzgZOEXpeOybxAH2\nPZivhOb5PG5AHeE4cq/ikdbN0Wyh/cEu10wReMNmc2WsjRNK6dw1ePXIuN6Y\nNSHO3TtyjSjVpjjr1TPCggHKOOZZwXfeLtJQbJmhvBL6klDwjGsW7+Cud+j8\nhc7e\r\n=YpMY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXQUH7j4lQv0pBcDK6kfrOPKwI0Yz6RpuG25TAc/OOZwIgGHkIAyRBdL9fCb6RXeC8uc7WRF7URWeaQ3COGtS871Y="}]},"maintainers":[{"name":"demostanis.worlds","email":"demostanis.worlds.alt@gmail.com"}],"_npmUser":{"name":"demostanis.worlds","email":"demostanis.worlds.alt@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/discord.js-commander_1.0.0_1566206539514_0.9239757900510759"},"_hasShrinkwrap":false},"1.0.1":{"name":"@demostanis.worlds/discord.js-commander","version":"1.0.1","description":"Make your Discord bot commands look like Bash commands`","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"prepublishOnly":"node ./node_modules/@babel/cli/lib/babel/index.js src --out-dir lib"},"babel":{"presets":["@babel/preset-env"]},"repository":{"type":"git","url":"git+https://github.com/demostanis-worlds/discord.js-commander.git"},"keywords":["discord.js-commander","discord-commander","discord.js","discord","commander"],"author":{"name":"demostanis"},"license":"MIT","bugs":{"url":"https://github.com/demostanis-worlds/discord.js-commander/issues"},"homepage":"https://github.com/demostanis-worlds/discord.js-commander#readme","dependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/preset-env":"^7.5.5","discord.js":"^11.5.1","parse-command":"0.0.102","tiny-timer":"^1.4.0"},"gitHead":"fc04efbe691015928b7c2be27683b57b54e7ce64","_id":"@demostanis.worlds/discord.js-commander@1.0.1","_nodeVersion":"10.14.1","_npmVersion":"6.10.0","dist":{"integrity":"sha512-eTenHqBGZgp1aCmeWeVE2HHRdXQaIQEwtVtvf3R+IJU+bPvtCnTQSwCjQBYEeDvwoGSLb4HGULPw5AnPYuY5xw==","shasum":"f22436fef73fc05c5593b3b62ec7bc39ce01adc3","tarball":"https://registry.npmjs.org/@demostanis.worlds/discord.js-commander/-/discord.js-commander-1.0.1.tgz","fileCount":3,"unpackedSize":14453,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdWm4TCRA9TVsSAnZWagAAlpUP/0qIiDhZBuv84puC+RFf\niXv83SiuZhozCeBEvQ2Jl1exAHhopusY1iNd0E4l5Z/fX8attysjl5BPvdUl\nodjcMF7ZEQeNZMC8W53KARcq9oViI5Z1nvAL6GZjNEL9tBkWJvnR+OxCFeiV\nMiGaiC8ygzVNED0kViddkZ6iS7hBKRRsGkUmWA72t7bQAzyAkiXcVmQMl3eE\nDQKfj8sI3X8A3RFtU8xXx9xV8VgHWNXJXVcvCWpRukqGscItR/3WyaX2asCS\nBhwuUUKD2KZG2Q0xzy5FRah762MObOYyivom88tKfCMuvIiTHz24YSh6jLDB\nSSjULfC2NR5v01rv+286EC9b/5/IAlvX5ofCFDQKO5Kp7vcMv2JBy+OhNoYo\nqz8eFfREd+1oBqps9Hkn2ZXpWJVjQRorhtRpLEwVnOQItA6hyRJE4KmbPmh1\n1XIWijXvX5g3UysF8ztpVYDar7LL8hW9Q2QZ4AK+x5LFPiDmzDa77xb+wABT\nxe8rtdEmXyktPnrqWiQRQ1dYeIFgNzXHqYeX7jpZqu2na7tPufv4bOx5A68S\nbbbEGe6eHvFxsamaQomWyz+G5VdSXCdBydHTLZSehxCk+LJEukQsCLLUfW6k\nZOSTIxHTk1NC9fBn3cVgfSknjfcA4xooTUFMjN15pB0nies17uoVW/0yEERG\nr1Lc\r\n=AVNl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC50PNVwqw30KAncghkWOeGAcsjPnepMI04vMFZx3rEvAIgYR3v6lQkGHM9Q3SoZlJnVIiLlFQeg6fXU/XMeGH2H2E="}]},"maintainers":[{"name":"demostanis.worlds","email":"demostanis.worlds.alt@gmail.com"}],"_npmUser":{"name":"demostanis.worlds","email":"demostanis.worlds.alt@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/discord.js-commander_1.0.1_1566207507085_0.38050437249691504"},"_hasShrinkwrap":false}},"time":{"created":"2019-08-19T09:22:19.285Z","1.0.0":"2019-08-19T09:22:19.640Z","modified":"2022-04-05T03:44:17.079Z","1.0.1":"2019-08-19T09:38:27.264Z"},"maintainers":[{"name":"demostanis.worlds","email":"demostanis.worlds.alt@gmail.com"}],"description":"Make your Discord bot commands look like Bash commands`","homepage":"https://github.com/demostanis-worlds/discord.js-commander#readme","keywords":["discord.js-commander","discord-commander","discord.js","discord","commander"],"repository":{"type":"git","url":"git+https://github.com/demostanis-worlds/discord.js-commander.git"},"author":{"name":"demostanis"},"bugs":{"url":"https://github.com/demostanis-worlds/discord.js-commander/issues"},"license":"MIT","readme":"# Discord.js commander\n# Make your Discord bot commands look like Bash commands\n\n# Install\n```sh\nnpm install @demostanis.worlds/discord.js-commander\n```\n\n# Example\n```js\nimport Discord from \"discord.js\"\nimport DiscordCommander from \"@demostanis.worlds/discord.js-commander\"\nimport \"dotenv/config\"\n\nconst client = new Discord.Client()\n\nclient.on(\"ready\", () => {\n\tconsole.log(`Logged in as ${client.user.tag}`)\n\n\tconst commander = new DiscordCommander({\n\t\tclient: client,\n\t\tcommands: [{\n\t\t\tname: \"*order-pizza\",\n\t\t\tdescription: \"Orders a pizza.\",\n\t\t\ttimeout: 10000,\n\t\t\targumentList: [{\n\t\t\t\tname: \"<type>\",\n\t\t\t\tdescription: \"Type of the pizza to order.\",\n\t\t\t\trequired: true\n\t\t\t}, {\n\t\t\t\tname: \"<size>\",\n\t\t\t\tdescription: \"Size of the pizza to order.\",\n\t\t\t\trequired: false\n\t\t\t}],\n\t\t\toptionList: [{\n\t\t\t\tname: \"--bacon\",\n\t\t\t\tdescription: \"Adds bacon to the pizza.\"\n\t\t\t}, {\n\t\t\t\tname: \"--cheese\",\n\t\t\t\tdescription: \"Adds cheese to the pizza.\",\n\t\t\t\tvipOnly: true\n\t\t\t}],\n\t\t\tdoes(message, argumentList, optionList) {\n\t\t\t\tconst type = argumentList.get(\"<type>\")\n\t\t\t\tconst size = argumentList.get(\"<size>\")\n\t\t\t\tconst bacon = optionList.get(\"--bacon\")\n\t\t\t\tconst cheese = optionList.get(\"--cheese\")\n\n\t\t\t\tmessage.channel.send(`Ordering pizza ${type} and size ${size ? size : \"normal\"} ${bacon ? \"with bacon\" : \"without bacon\"} ${cheese ? \"and cheese\": \"and without cheese\"}`)\n\t\t\t}\n\t\t}],\n\t\targumentRequiredMessage: arg => `you forgot required argument: ${arg.name}.`,\n\t\tcommandInTimeoutMessage: timeLeft => `please slow down! ${timeLeft}ms left.`,\n\t\tvipOnlyCommandMessage: command => `${command.name} command is reserved for VIPs. Become VIP at https://patreon.com/demostanis.`,\n\t\tvipOnlyOptionMessage: option => `${option.name} option is reserved for VIPs. Become VIP at https://patreon.com/demostanis.`,\n\t\tdisabledChannels: client.channels.filter(channel => !([\"601766574206222347\", \"604250599927578624\"].indexOf(channel.id) >= 0)),\n\t\tvipRole: \"604250294846750720\"\n\t})\n})\n\nclient.login(process.env.TOKEN)\n```\n\n# API\n- new DiscordCommander(options: Options) => DiscordCommander\n\n```ts\nexport as namespace DiscordCommander\n\nexport interface Options {\n\tclient: Discord.Client\n\tcommands: Commands[]\n\targumentRequiredMessage: Function\n\tcommandInTimeoutMessage: Function\n\tvipOnlyCommandMessage: Function\n\tvipOnlyOptionMessage: Function\n\tdisabledChannels: Discord.Collection\n\tvipRole: string\n}\n\nexport interface Commands {\n\tname: string\n\tdescription: string\n\ttimeout: number\n\targumentList: Argument[]\n\toptionList: Option[]\n\tdoes: Function\n}\n\nexport interface Argument {\n\tname: string\n\tdescription: string\n\trequired: boolean\n}\n\nexport interface Option {\n\tname: string\n\tdescriptiob: string\n\tvipOnly: boolean\n}\n```\n","readmeFilename":"README.md"}