{"id":23165572,"url":"https://github.com/nea89o/jdacommandinterface","last_synced_at":"2025-06-24T13:40:12.998Z","repository":{"id":113887238,"uuid":"201325517","full_name":"nea89o/jdacommandinterface","owner":"nea89o","description":null,"archived":false,"fork":false,"pushed_at":"2020-07-21T14:15:20.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T21:33:39.710Z","etag":null,"topics":["boilerplate","jda","jitpack"],"latest_commit_sha":null,"homepage":null,"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/nea89o.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-08-08T19:38:38.000Z","updated_at":"2021-04-23T01:33:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"54f19416-331f-4f54-a9fe-8bf1d3dc8986","html_url":"https://github.com/nea89o/jdacommandinterface","commit_stats":null,"previous_names":["nea89o/jdacommandinterface"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/nea89o/jdacommandinterface","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nea89o%2Fjdacommandinterface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nea89o%2Fjdacommandinterface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nea89o%2Fjdacommandinterface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nea89o%2Fjdacommandinterface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nea89o","download_url":"https://codeload.github.com/nea89o/jdacommandinterface/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nea89o%2Fjdacommandinterface/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261686684,"owners_count":23194318,"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":["boilerplate","jda","jitpack"],"created_at":"2024-12-18T01:27:37.099Z","updated_at":"2025-06-24T13:40:12.961Z","avatar_url":"https://github.com/nea89o.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## JDA Command Interface\n\nEven though there are a lot of different Command handlers and interfaces, i decided to create my own framework. The ambition of this framework is to be somewhat close to [`discord.ext.commands`][discordpyext] from [discord.py][discordpy]\n\n\n## Installation\nInstall simply via [Jitpack][jitpack]: \n```groovy\nrepositories {\n    maven {\n        url 'https://jitpack.io'\n    }\n    jcenter()\n}\n\ndependencies {\n    compile group: 'net.dv8tion', name:'JDA', version: '4.BETA.0_37'\n    compile group: 'com.github.romangraef.jdacommandinterface', name:'jdacommandinterface-core', version: '1.2.0'\n}\n```\n\n\n### Features\nThe whole library is currently split into three parts, which the individual user can mix and match.\n\nThe key feature i wanted to carry over from [`discord.ext.commands`][discordpyext] was the ability to define commands simply as a method, with an annotation and get automatic mapping to things like argument parsing and conversion to Java (or respectively Python) objects. For example: \n\n```java\n@CommandDescription(\n        name = \"dm\",\n        triggers = {\"dm\", \"directmessage\"},\n        description = \"Sends a direct message to someone\",\n        longDescription = \"Send a direct message to your friends and family! Please don't abuse!\",\n        usage = {\n                \"ping @B1nzy ban me, daddy\",\n                \"ping @romangraef Hey, how are you\"\n        }\n)\n@Checks({Check.DEVELOPER_ONLY})\npublic class DMCommand extends Command {\n    public void execute(Context context, User to, String message) {\n        to.openPrivateChannel().queue(\n                channel -\u003e channel.sendMessage(new EmbedBuilder()\n                        .setColor(Color.cyan)\n                        .setTitle(String.format(\"A message from %s:\", context.getAuthor().getName()))\n                        .setDescription(message)\n                        .build()).queue());\n        context.send(new EmbedBuilder()\n                .setTitle(\"Message sent!\")\n                .setDescription(\"Thanks for using me!\")\n                .build()).queue();\n    }\n}\n```\n\nAs you can see there isn't really a lot of boilerplate code going on. All we really have in terms of boilerplate is the @CommandDescription annotation, which can be used with *only* the name parameter, the rest is only there to customize the help. The corresponding main isn't much longer:\n\n```java\n\npublic class Main {\n    public static void main(String[] args) throws LoginException {\n        CommandListener commandListener = new CommandListenerBuilder()\n                .setPrefix(\"+\")\n                .findCommands(\"io.github.romangraef.jdacommandinterface.examples.core.commands\") // finds all commands in that package\n                .build();\n\n        JDA jda = new JDABuilder()\n                .setToken(System.getenv(\"TOKEN\"))\n                .addEventListeners(commandListener)\n                .build();\n\n    }\n}\n```\nIt doesn't get much simpler than that!\n\n### Wiki\n\nFor more information view the [wiki][wiki], which i try to keep up to date.\n\n\n[discordpy]: https://github.com/Rapptz/discord.py/\n[discordpyext]: https://discordpy.readthedocs.io/en/latest/ext/commands/index.html\n[jitpack]: https://jitpack.io\n[wiki]: https://github.com/romangraef/jdacommandinterface/wiki\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnea89o%2Fjdacommandinterface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnea89o%2Fjdacommandinterface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnea89o%2Fjdacommandinterface/lists"}