{"id":16443973,"url":"https://github.com/ayfri/basic-commandhandler","last_synced_at":"2026-01-18T06:52:37.126Z","repository":{"id":37818925,"uuid":"234114884","full_name":"Ayfri/Basic-CommandHandler","owner":"Ayfri","description":"This is a simple Command Handler with modules.","archived":false,"fork":false,"pushed_at":"2024-06-18T06:39:38.000Z","size":179,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T10:11:23.616Z","etag":null,"topics":["bot","command-handler","discord-js"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ayfri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-15T15:47:19.000Z","updated_at":"2025-02-06T18:30:44.000Z","dependencies_parsed_at":"2024-06-18T08:07:32.342Z","dependency_job_id":null,"html_url":"https://github.com/Ayfri/Basic-CommandHandler","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayfri%2FBasic-CommandHandler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayfri%2FBasic-CommandHandler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayfri%2FBasic-CommandHandler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayfri%2FBasic-CommandHandler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ayfri","download_url":"https://codeload.github.com/Ayfri/Basic-CommandHandler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247086024,"owners_count":20881160,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","command-handler","discord-js"],"created_at":"2024-10-11T09:22:51.953Z","updated_at":"2026-01-18T06:52:37.089Z","avatar_url":"https://github.com/Ayfri.png","language":"JavaScript","readme":"# Basic CommandHandler\n\nThis is a simple Command Handler using `module.exports` for a configuration, run function and help module for a help command auto-generated.\n\nI'd advice you to know JavaScript and Node.js before using it.\u003cbr\u003e\nYou'll understand that this Command Handler is very basic and for a big projet you should probably use a better one.\u003cbr\u003e\nI can recommend you the other one I've made : [Advanced Command Handler](https://github.com/Advanced-Command-Handler/Advanced-Command-Handler).\n\n## How to use it\n\nSimply clone this repo.\n```bash\ngit clone https://github.com/Ayfri/Basic-CommandHandler\n```\nSet the [configuration](#Configuration) and you're ready to go.\n\nIf you want to use Discord.js v12, use this command instead.\n```bash\ngit clone -b v12 https://github.com/Ayfri/Basic-CommandHandler\n```\nIt will clone the `v12` branch of this repo.\n\n## Configuration\n\nTo start the bot you have to start with NodeJS the `main.js` file. If you want the bot to be sharded, start with le `index.js` file. There is a configuration file, `informations/config.json`.\nIn `owners` you have to add your ID (in a String).\n\n## Templates\n\n### Command\n\n```js\nmodule.exports.run = async (client, message, args) =\u003e {\n\t// Code goes here.\n};\n\nmodule.exports.config = {\n\tcategory: '',\n\tname: __filename.slice(__dirname.length + 1, __filename.length - 3),\n\taliases: [],\n\tserverForced: false,\n};\n\nmodule.exports.help = {\n\tdescription: '',\n\tsyntax: ``,\n\texamples: ``,\n};\n```\n\nThe name of the command is the name of the file. All the props in the modules are required.\n\n### Event\n\n```js\nmodule.exports = async (client, event, args) =\u003e {\n\t// Code goes here.\n};\n```\n\n## Features\n\nThere are already managed categories :\n\n-   not-ready : Like owner category.\n-   owner : Owners only (configuration).\n-   administration : Only users that have the `ADMINISTRATOR` permission.\n-   moderation : Only users that have the `KICK_MEMBERS` permission.\n\nThe `client` object has added methods and props like :\n\n| Field name                  | Description                          |\n| --------------------------- | ------------------------------------ |\n| commands                    | Enmap Object.                        |\n| writeFile( Path, JSObject ) | Safely save your JSObject in a JSON. |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayfri%2Fbasic-commandhandler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayfri%2Fbasic-commandhandler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayfri%2Fbasic-commandhandler/lists"}