{"_id":"@devspeed/discord-client","_rev":"3-ea5f1b7a3a6a9a176bb98b3ece04cd7f","name":"@devspeed/discord-client","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@devspeed/discord-client","version":"1.0.0","description":"A discord package that allows you to create a discord bot faster","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"node ./test/index.js"},"author":"","license":"(GPL-3.0)","devDependencies":{"discord.js":"^14.11.0"},"keywords":["discord","discord bot","command handler"],"peerDependencies":{"discord.js":"^14.11.0"},"gitHead":"c462274239b4c31dd4f65071be94c12deae67e47","_id":"@devspeed/discord-client@1.0.0","_nodeVersion":"19.9.0","_npmVersion":"9.6.5","dist":{"integrity":"sha512-bZQ16+JUM53pWL5/aUnzwFOMV2E4brDsthmznhiKbqsBjN+Nr3+Dk5JNDCd2tO7612NhBwZ+svZTXbU8qJdlog==","shasum":"573f2a3c108ded67ffcfea0df9312150d91b0772","tarball":"https://registry.npmjs.org/@devspeed/discord-client/-/discord-client-1.0.0.tgz","fileCount":23,"unpackedSize":36169,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxE1dFRwqWCemaUvCGLjq5vl9MGzF3/IXf9L+mt4Nd2QIgG0bMhv75k8AyoXfzgfLb9iwHgliek3wIVbhgH/hFurI="}]},"_npmUser":{"name":"silentwolf-dev","email":"omariimanibrown421@gmail.com"},"directories":{},"maintainers":[{"name":"silentwolf-dev","email":"omariimanibrown421@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/discord-client_1.0.0_1686281904896_0.357484696182647"},"_hasShrinkwrap":false},"1.0.1":{"name":"@devspeed/discord-client","version":"1.0.1","description":"A discord package that allows you to create a discord bot faster","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"node ./test/index.js"},"author":"","license":"(GPL-3.0)","devDependencies":{"discord.js":"^14.11.0"},"keywords":["discord","discord bot","command handler","discord bot client"],"peerDependencies":{"discord.js":"^14.11.0"},"gitHead":"9db4fb26d22cf32272a80f6927455efb0a417982","_id":"@devspeed/discord-client@1.0.1","_nodeVersion":"19.9.0","_npmVersion":"9.6.5","dist":{"integrity":"sha512-QnXBad8XS9kkDoh0NHrSPyZkmXd9151bTNpRHBXxG1TefZgFk/EATx+SKXz1iuNvf8G4FFia+BaIIYAjULQwnw==","shasum":"9f728fb0a25b468d7c36dd31a77ac9570f822a2f","tarball":"https://registry.npmjs.org/@devspeed/discord-client/-/discord-client-1.0.1.tgz","fileCount":25,"unpackedSize":39805,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzctUGFOoQacWCX5dvCBsPWheC/DLChBB+bTydFxw8sgIgR3JE5NMP0TE22aF1cXmLXVNZ0BG4OsibtFqqyfEkVN4="}]},"_npmUser":{"name":"silentwolf-dev","email":"omariimanibrown421@gmail.com"},"directories":{},"maintainers":[{"name":"silentwolf-dev","email":"omariimanibrown421@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/discord-client_1.0.1_1686351801072_0.9619403171288397"},"_hasShrinkwrap":false},"1.0.2":{"name":"@devspeed/discord-client","version":"1.0.2","description":"A discord package that allows you to create a discord bot faster","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"test":"node ./test/index.js"},"author":"","license":"(GPL-3.0)","devDependencies":{"discord.js":"^14.11.0"},"keywords":["discord","discord bot","command handler","discord bot client"],"peerDependencies":{"discord.js":"^14.11.0"},"gitHead":"9db4fb26d22cf32272a80f6927455efb0a417982","_id":"@devspeed/discord-client@1.0.2","_nodeVersion":"19.9.0","_npmVersion":"9.6.5","dist":{"integrity":"sha512-EGlnzzJTbMPquSdPGjie9kNZsk/by/eNmYIbWDQbRDwu0yahzEWGhb3VVRDo9cTVHkppN7exGH9UYrIpez/SZg==","shasum":"5731d36ac24acdb2f03676608bd1e281357a1863","tarball":"https://registry.npmjs.org/@devspeed/discord-client/-/discord-client-1.0.2.tgz","fileCount":25,"unpackedSize":39896,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOns4Xmv0RBka72gK11ZILmMRsKJidOw4w6yFk5KVplgIgUPq9Hi354QmstH5UYTjNqWcl0/KXvvcP4wqMXppX0BY="}]},"_npmUser":{"name":"silentwolf-dev","email":"omariimanibrown421@gmail.com"},"directories":{},"maintainers":[{"name":"silentwolf-dev","email":"omariimanibrown421@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/discord-client_1.0.2_1686360305903_0.3082589293795073"},"_hasShrinkwrap":false},"1.0.4":{"name":"@devspeed/discord-client","version":"1.0.4","description":"A discordjs package that provide you with util functions and classes to help speed up your development","main":"./lib/index.js","types":"./lib/index.d.ts","homepage":"https://www.buymeacoffee.com/netlinedevs","donations":"https://www.buymeacoffee.com/netlinedevs","repository":{"type":"git","url":"git+https://github.com/DevSpeedjs/discord-client.git#master"},"scripts":{"test":"node ./test/index.js"},"author":"","license":"(GPL-3.0)","devDependencies":{"discord.js":"^14.11.0"},"keywords":["discord","discord bot","command handler","discord bot client","discord command handler","discord Recursive commmand Loader","Recursive loader","discordjs","discord"],"peerDependencies":{"discord.js":"^14.11.0"},"gitHead":"9db4fb26d22cf32272a80f6927455efb0a417982","bugs":{"url":"https://github.com/DevSpeedjs/discord-client/issues"},"_id":"@devspeed/discord-client@1.0.4","_nodeVersion":"19.9.0","_npmVersion":"9.6.5","dist":{"integrity":"sha512-3aoYuwWj/YFBBB8epIz/sIdTFtHze0Mhw+DOSR0XkyzLKr1Mt7sCSFJ5xSWe0niImOJ7wujH7fUhzNSNIzbZvA==","shasum":"6944da57a3a6c157233c82d39bf67ea2502c9d43","tarball":"https://registry.npmjs.org/@devspeed/discord-client/-/discord-client-1.0.4.tgz","fileCount":17,"unpackedSize":36283,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8zmHGnoXufgXixGIYRtf/mw2qcB3brsoJFmm+2lZ1SgIhAINeuMr2E7KLBAQgNLqCAdMf3sOyGvvhxJ8OsZyJtWA2"}]},"_npmUser":{"name":"silentwolf-dev","email":"omariimanibrown421@gmail.com"},"directories":{},"maintainers":[{"name":"silentwolf-dev","email":"omariimanibrown421@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/discord-client_1.0.4_1689537196953_0.30078699711967327"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-09T03:38:24.838Z","1.0.0":"2023-06-09T03:38:25.092Z","modified":"2023-07-16T19:53:17.402Z","1.0.1":"2023-06-09T23:03:21.294Z","1.0.2":"2023-06-10T01:25:06.089Z","1.0.4":"2023-07-16T19:53:17.185Z"},"maintainers":[{"name":"silentwolf-dev","email":"omariimanibrown421@gmail.com"}],"description":"A discordjs package that provide you with util functions and classes to help speed up your development","keywords":["discord","discord bot","command handler","discord bot client","discord command handler","discord Recursive commmand Loader","Recursive loader","discordjs","discord"],"license":"(GPL-3.0)","readme":"# Documentation\r\n\r\n[Invite to My Discord Server](https://discord.gg/sKmfq7DU58)\r\n\r\nif you find this package helpful, please consider supporting its development by making a donation:\r\n[Donate](https://www.buymeacoffee.com/netlinedevs)\r\n\r\nPlease report any issues or bugs on our GitHub page so we can improve our services for everyone. [github](https://github.com/DevSpeedjs/discord-client/issues)\r\n\r\n## Requirements\r\n\r\nThis package require [disocrd.js](https://www.npmjs.com/package/discord.js) to function.\r\n\r\n## Get Started\r\n\r\n```js\r\nconst { Loaders, RecursiveLoader, resgisterGuildCommand } = require(\"@devspeed/discord-client\");\r\nconst { Client } = require(\"discord.js\");\r\n\r\nconst client = new Client({\r\n    intents: [\"Guilds\"]\r\n});\r\n\r\n\r\nLoaders.loadEvents(__dirname, { directory: \"./events\", client })\r\n\r\n\r\nconst { collection, JsonData } = RecursiveLoader.loadSlashCommands(__dirname, { directory: \"./slash\" });\r\n\r\n// returns a collection\r\nconst messageCommand = RecursiveLoader.loadMessageCommands(__dirname, { directory: \"commands\" })\r\n\r\nclient.slashCommands = collection;\r\n\r\nclient.messageCommand = messageCommand;\r\n\r\nconsole.log(client.slashCommands)\r\nconsole.log(client.messageCommand)\r\n\r\nresgisterGuildCommand({\r\n    clientId: 'client id goes here',\r\n    guilldId: 'guilid id goes here',\r\n    token: \"token goes here\",\r\n    commands: JsonData, //  the slash command loader already returns the collection and the jsonData\r\n})\r\n\r\nclient.login(\"token goes\");\r\n```\r\n\r\nThe recursive loader will load every file in the specified directory, regardless of how deeply nested it is within your folder structure.If you prefer not to load every file in the specified directory, you can opt to use a regular loader instead **see below for example**\r\n\r\n```js\r\nconst { Loaders } = require(\"@devspeed/discord-client\");\r\n\r\nconst collection = Loaders.loadSlashCommand(__dirname, { directory: '/slash'}); \r\n\r\n```\r\n\r\n### Adding filter\r\n\r\n```js\r\nLoaders.loadSlashCommand(__dirname, { \r\n    directory: '/slash',\r\n    filter: (file) => file.endsWith(\".js\") || file.endsWith(\"ts\"), // the default value when filter is undefined\r\n});\r\n```\r\n\r\nTo extract the exported data object from only certain files within the specified directory, you can use the `filter` function. This function takes the currently iterated file as a parameter and returns a boolean value. If the boolean is `true`, the exported data object will be extracted.\r\n\r\n### defining slashCommand\r\n\r\n```js\r\nconst { SlashCommand } = require(\"@devspeed/discord-client\")\r\nconst { SlashCommandBuilder } = require('discord.js');\r\n\r\n\r\nmodule.exports = new SlashCommand({\r\n    data: new SlashCommandBuilder()\r\n        .setName(\"help\")\r\n        .setDescription(\"help command\"),\r\n\r\n    async execute(client, interaction) {\r\n        await interaction.reply(\"pong\"); \r\n    }\r\n})\r\n```\r\n\r\n### defining MessageCommand\r\n\r\n```js\r\nconst { MessageCommand } = require(\"@devspeed/discord-client\");\r\n\r\nmodule.exports = new MessageCommand({\r\n    name: \"ping\",\r\n    description: \"A simple pong command\",\r\n    cooldown: 10,\r\n    category: \"general\",\r\n    enabled: true,\r\n    execute: (client, message, args) => {\r\n        console.log(client, message, args)\r\n    }\r\n})\r\n```\r\n\r\n### defining Events\r\n\r\n```js\r\nconst { EventHandler } = require(\"@devspeed/discord-client\");\r\n\r\nmodule.exports = new EventHandler({\r\n    name: \"ready\",\r\n    execute(client, interaction) {\r\n       /// console.log(`logined in as ${client.user.tag}`);\r\n\r\n      console.log(client.user)\r\n    }\r\n})\r\n```\r\n","readmeFilename":"readme.md","homepage":"https://www.buymeacoffee.com/netlinedevs","repository":{"type":"git","url":"git+https://github.com/DevSpeedjs/discord-client.git#master"},"bugs":{"url":"https://github.com/DevSpeedjs/discord-client/issues"}}