{"id":18545292,"url":"https://github.com/jdiscordbots/command-framework","last_synced_at":"2026-06-13T16:01:53.735Z","repository":{"id":144452193,"uuid":"268880134","full_name":"JDiscordBots/command-framework","owner":"JDiscordBots","description":"A command system for JDA that allows to treat slash and text commands the same","archived":false,"fork":false,"pushed_at":"2024-05-08T21:10:00.000Z","size":136,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-24T08:42:40.388Z","etag":null,"topics":["command-framework","command-system","discord-bot","discord-jda","discord-slash-commands","jda","library","slash-commands"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JDiscordBots.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-06-02T18:37:24.000Z","updated_at":"2024-05-08T21:10:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"2c9f554c-776e-4d12-8a93-0f32f7a0cc06","html_url":"https://github.com/JDiscordBots/command-framework","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/JDiscordBots/command-framework","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JDiscordBots%2Fcommand-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JDiscordBots%2Fcommand-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JDiscordBots%2Fcommand-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JDiscordBots%2Fcommand-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JDiscordBots","download_url":"https://codeload.github.com/JDiscordBots/command-framework/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JDiscordBots%2Fcommand-framework/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34290348,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["command-framework","command-system","discord-bot","discord-jda","discord-slash-commands","jda","library","slash-commands"],"created_at":"2024-11-06T20:19:40.446Z","updated_at":"2026-06-13T16:01:53.729Z","avatar_url":"https://github.com/JDiscordBots.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Command Framework\n\nA command system for JDA that allows to treat slash and text commands the same\n\n## Usage\n\n1. Add Command-Framework to the dependencies section of your `pom.xml` (replace VERSION with [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.jdiscordbots/command-framework/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.jdiscordbots/command-framework)):\n```xml\n\u003cdependencies\u003e\n\t\u003cdependency\u003e\n\t\t\u003cgroupId\u003eio.github.jdiscordbots\u003c/groupId\u003e\n\t\t\u003cartifactId\u003ecommand-framework\u003c/artifactId\u003e\n\t\t\u003cversion\u003eVERSION\u003c/version\u003e\n\t\t\u003cscope\u003ecompile\u003c/scope\u003e\n\t\u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n2. Create an instance of `CommandFramework`\n3. Set prefix, owners etc.\n4. Build the command listener using `CommandFramework#build()` and add it to your JDA(Builder) instance as an event listener\n5. Create command classes which are annotated by `@Command(\"commandname\")` and implement the `ICommand` interface\n6. See how it works perfectly\n\n### Working example:\n\nMain:\n```java\npublic class Main {\n    public static void main(String[] args) throws LoginException {\n    \t\tfinal JDABuilder builder = JDABuilder.createDefault(\"your token\");\n    \t\tfinal CommandFramework framework = new CommandFramework() // Step 1\n                    /* Step 2 */\n    \t\t\t\t.setMentionPrefix(true) // Allow mention prefix, Default: true\n    \t\t\t\t.setPrefix(\"prefix\") // Default: !\n    \t\t\t\t.setOwners(\"owner1\", \"optional owner 2\", \"...\", \"optional owner n\"); // Set owners for permissions system, Default: {}\n    \n    \t\tbuilder.addEventListeners(framework.build()).build(); // Step 3\n    \t}\n}\n```\n\nExample command:\n```java\nimport io.github.jdiscordbots.command_framework.command.*;\n\n@Command({\"example\", \"examplealias\"}) // Step 4\npublic class Example implements ICommand {\n    @Override\n    public void action(CommandEvent event) {\n        event.getChannel().sendMessage(\"Example command reply\").queue();\n    }\n\n    @Override\n    public String help() {\n        return \"Example command\";\n    }\n}\n```\n\nExample permission restricted command:\n```java\n\nimport io.github.jdiscordbots.command_framework.command.*;\n\nimport net.dv8tion.jda.api.Permission;\n\n@Command({\"permissionexample\", \"permissionexamplealias\"}) // Step 4\npublic class PermissionExample implements ICommand {\n    @Override\n    public void action(CommandEvent event) {\n        event.getChannel().sendMessage(\"Permission example command reply\").queue();\n    }\n    \n    @Override\n    public boolean allowExecute(CommandEvent event) {\n        return event.getMember().hasPermission(Permission.MANAGE_PERMISSIONS); // Allow use of command only to members with manage permissions permission\n    }\n\n    @Override\n    public String help() {\n        return \"Permission example command\";\n    }\n}\n```\n\n### Docs\nYou can take a look at the JavaDoc at [javadoc.io](https://javadoc.io/doc/io.github.jdiscordbots/command-framework/latest/index.html).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdiscordbots%2Fcommand-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdiscordbots%2Fcommand-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdiscordbots%2Fcommand-framework/lists"}