{"id":18572721,"url":"https://github.com/botblock/javabotblockapi","last_synced_at":"2025-07-12T06:33:11.415Z","repository":{"id":48449060,"uuid":"199026414","full_name":"botblock/JavaBotBlockAPI","owner":"botblock","description":"Java Wrapper for the BotBlock API [Java - maintained by @Andre601]","archived":false,"fork":false,"pushed_at":"2021-12-18T14:53:40.000Z","size":3811,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T20:45:28.678Z","etag":null,"topics":["botblock","discord","discord-api","hacktoberfest","java"],"latest_commit_sha":null,"homepage":"https://jbba.dev/docs","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/botblock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2019-07-26T14:00:09.000Z","updated_at":"2025-03-30T00:45:54.000Z","dependencies_parsed_at":"2022-09-12T00:42:11.469Z","dependency_job_id":null,"html_url":"https://github.com/botblock/JavaBotBlockAPI","commit_stats":null,"previous_names":[],"tags_count":100,"template":false,"template_full_name":null,"purl":"pkg:github/botblock/JavaBotBlockAPI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botblock%2FJavaBotBlockAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botblock%2FJavaBotBlockAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botblock%2FJavaBotBlockAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botblock%2FJavaBotBlockAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/botblock","download_url":"https://codeload.github.com/botblock/JavaBotBlockAPI/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botblock%2FJavaBotBlockAPI/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264951608,"owners_count":23687973,"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":["botblock","discord","discord-api","hacktoberfest","java"],"created_at":"2024-11-06T23:07:02.543Z","updated_at":"2025-07-12T06:33:11.395Z","avatar_url":"https://github.com/botblock.png","language":"Java","readme":"[BotBlock]: https://botblock.org  \n[API]: https://botblock.org/api/docs\n[list]: https://botblock.org/api/docs#count\n\n[BotBlock4J]: https://github.com/spide-r/BotBlock4J\n\n[wiki]: https://jbba.dev/docs\n\n[CodeMCBadge]: https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fci.codemc.io%2Fjob%2Fbotblock%2Fjob%2FJavaBotBlockAPI%2F\u0026label=Dev%20Builds\u0026style=plastic  \n[CodeMC]: https://ci.codemc.io/job/botblock/job/JavaBotBlockAPI/\n\n[DownloadBadge]: https://img.shields.io/nexus/maven-public/org.botblock/javabotblockapi-core?label=Release\u0026server=https%3A%2F%2Frepo.codemc.io\u0026style=plastic\n[Download]: https://ci.codemc.io/job/botblock/job/JavaBotBlockAPI/lastSuccessfulBuild\n\n[JDA]: https://github.com/DV8FromTheWorld/JDA  \n[Javacord]: https://github.com/javacord/Javacord\n\n[OkHttp]: https://github.com/square/okhttp/  \n[JSON]: https://github.com/stleary/JSON-java  \n[Caffeine]: https://github.com/ben-manes/caffeine  \n\n[contributors.md]: https://github.com/botblock/JavaBotBlockAPI/blob/master/contributors.md\n\n[Javadoc]: https://docs.botblock.org/JavaBotBlockAPI\n[image]: https://docs.botblock.org/JavaBotBlockAPI/assets/img/JavaBotBlockAPI.png\n[site]: https://docs.botblock.org/JavaBotBlockAPI/core/org/botblock/javabotblockapi/core/Site.html\n\n![image]\n\nJavaBotBlockAPI is a continued and updated Java Wrapper for [BotBlock], a website that makes it possible to update guild counts on multiple lists with one API.  \nThis wrapper is a fork of [BotBlock4J] and was updated and improved to make it as userfriendly as possible.\n\n# Installation\n[![DownloadBadge]][Download] [![CodeMCBadge]][CodeMC]\n\nYou can install JavaBotBlockAPI through the following methods.  \nMake sure to replace `{version}` with the above shown version.\n\n## Gradle\nTo download the different modules will you need to add the following snippets to your `build.gradle`:\n\n```groovy\nrepositories{\n    maven{ url = 'https://repo.codemc.io/repository/maven-public' }\n}\n\ndependencies{\n    // Core Module. Always needed\n    compile group: 'org.botblock', name: 'javabotblockapi-core', version: '{version}'\n\n    // Request Module. Depends on Core\n    compile group: 'org.botblock', name: 'javabotblockapi-request', version: '{version}'\n\n    // JDA Module. Depends on Core and Request\n    compile group: 'org.botblock', name: 'javabotblockapi-jda', version: '{version}'\n    \n    // Javacord Module. Depends on Core and Request\n    compile group: 'org.botblock', name: 'javabotblockapi-javacord', version: '{version}'\n}\n```\n\n## Maven\nTo download the different modules will you need to add the following snippets to your `pom.xml`:\n\n```xml\n\u003crepositories\u003e\n  \u003crepository\u003e\n    \u003cid\u003ecodemc\u003c/id\u003e\n    \u003curl\u003ehttps://repo.codemc.io/repository/maven-public\u003c/url\u003e\n  \u003c/repository\u003e\n\u003c/repositories\u003e\n\n\u003cdependencies\u003e\n  \u003c!-- Core Module. Always needed --\u003e\n  \u003cdependency\u003e\n    \u003cgroupId\u003eorg.botblock\u003c/groupId\u003e\n    \u003cartifactId\u003ejavabotblockapi-core\u003c/artifactId\u003e\n    \u003cversion\u003e{version}\u003c/version\u003e\n  \u003c/dependency\u003e\n\n  \u003c!-- Request Module. Depends on Core --\u003e\n  \u003cdependency\u003e\n    \u003cgroupId\u003eorg.botblock\u003c/groupId\u003e\n    \u003cartifactId\u003ejavabotblockapi-request\u003c/artifactId\u003e\n    \u003cversion\u003e{version}\u003c/version\u003e\n  \u003c/dependency\u003e\n\n  \u003c!-- JDA Module. Depends on Core and Request --\u003e\n  \u003cdependency\u003e\n    \u003cgroupId\u003eorg.botblock\u003c/groupId\u003e\n    \u003cartifactId\u003ejavabotblockapi-jda\u003c/artifactId\u003e\n    \u003cversion\u003e{version}\u003c/version\u003e\n  \u003c/dependency\u003e\n\n  \u003c!-- Javacord Module. Depends on Core on Request --\u003e\n  \u003cdependency\u003e\n    \u003cgroupId\u003eorg.botblock\u003c/groupId\u003e\n    \u003cartifactId\u003ejavabotblockapi-javacord\u003c/artifactId\u003e\n    \u003cversion\u003e{version}\u003c/version\u003e\n  \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n# Usage Examples\nBelow will you find a few examples on how JavaBotBlockAPI can/should be used.  \nPlease make sure to also take a look at the [Javadoc] for any additional information.\n\n## BotBlockAPI\n\u003e **Required Modules**:  \n\u003e - `core`\n\nIf you want to POST guild counts to the various bot lists should you first create a BotBlockAPI instance.  \nThe BotBlockAPI class contains a nested Builder class which allows a more streamlined creation of a BotBlockAPI instance.\n\n**Example**:  \n```java\nBotBlockAPI api = new BotBlockAPI.Builder()\n    .addAuthToken(\"discordextremelist.xyz\", \"my_s3cr3t_t0k3n\")\n    .addAuthToken(Site.DISCORDLIST_SPACE, \"my_53cret_tok3n\")\n    .build();\n```\n\nAs you can see can you provide either a String with the id you can find [here][list] or use one of the many static [Site] instances that are offered.  \nThe Builder has some extra methods that can be used to further customize specific behaviours. Take a look on the [Javadoc] for those.\n\nNext would you need to choose, which type of PostAction you want to use. Depending on your selection will you need to have the right module(s) downloaded.\n\n## Default PostAction\n\u003e **Required Modules**:  \n\u003e - `request`\n\u003e\n\u003e *In the following examples will `botId` and `guilds` be used. Those are placeholders for your bot's ID and Guild count respectively.*\n\n```java\n// Create PostAction instance\nPostAction postAction = new PostAction(\"botId\");\n\n// Post manually\npostAction.postGuilds(\"botId\", guilds, api);\n\n// Post automatically\npostAction.enableAutoPost(\"botId\", guilds, api);\n\n// Disable automatic posting\npostAction.disableAutoPost(); // Disable with no delay\npostAction.disableAutoPost(api); // Disable with BotBlockAPI#getUpdateDelay() delay\npostAction.disableAutoPost(1, TimeUnit.MINUTES); // Disable with 1 Minute delay.\n```\n\n## JDA PostAction\n\u003e **Required Modules**:  \n\u003e - `request`\n\u003e - `jda`\n\n```java\n/*\n * Get your JDA instance.\n * This can also be a ShardManager instance\n * for sharded Bots.\n */\nJDA jda = getJDA();\n\n// Create PostAction instance\nPostAction postAction = new PostAction(jda);\n\n\n// Post manually\npostAction.postGuilds(jda, api);\n\n// Post automatically\npostAction.enableAutoPost(jda, api);\n\n// Disable automatic posting\npostAction.disableAutoPost(); // Disable with no delay\npostAction.disableAutoPost(api); // Disable with BotBlockAPI#getUpdateDelay() delay\npostAction.disableAutoPost(1, TimeUnit.MINUTES); // Disable with 1 Minute delay.\n```\n\n## Javacord PostAction\n\u003e **Required Modules**:  \n\u003e - `request`\n\u003e - `javacord`\n\n```java\n/*\n * Get your DiscordApi instances.\n */\nDiscordApi[] discordApis = getDiscordApis();\n\n// Create PostAction instance\nPostAction postAction = new PostAction(discordApis[0]);\n\n// Post manually\npostAction.postGuilds(api, discordApis);\n\n// Post automatically\npostAction.enableAutoPost(api, discordApis);\n\n// Disable automatic posting\npostAction.disableAutoPost(); // Disable with no delay\npostAction.disableAutoPost(api); // Disable with BotBlockAPI#getUpdateDelay() delay\npostAction.disableAutoPost(1, TimeUnit.MINUTES); // Disable with 1 Minute delay.\n```\n\n----\n## Get Bot Information\n\u003e **Required Modules**:  \n\u003e - `core`\n\u003e - `request`\n\nYou can use the GetBotAction class to retrieve information about a bot on the different Bot lists.  \nThe class offers options for either getting the full information as JSONObject, or to retrieve specific information such as the authors of the bot.\n\nDue to the huge amount of methods offered by this class are we not showing any examples here.  \nA look into the [Javadoc] is highly recommendet.\n\n----\n## Get List Information\n\u003e **Required Modules**:  \n\u003e - `core`\n\u003e - `request`\n\nSimilar to [Getting Bot Information](#get-bot-information) can you also retrieve information known by BotBlock about either all or specific bot lists.  \nThe GetListAction allows the retrieval of all Bot Lists and their information as a JSONObject, or a specific info such as the URL used for seeing a Bot's list entry for a specific bot list.\n\nDue to the huge amount of methods offered by this class are we not showing any examples here.  \nA look into the [Javadoc] is highly recommendet.\n\n# Libraries/Dependencies\nJavaBotBlockAPI utilizes different APIs to provide the functionality it offers right now.  \nWe have a list of those libraries listed here.\n\n- **Javacord Module**\n  - [Javacord] - Java Wrapper for making Discord Bots.\n- **JDA Module**\n  - [JDA] - Java library used for creating bots.\n- **Request Module**\n  - [OkHttp] - Library for creating and managing http requests.\n  - [JSON] - Used for JSON management.\n  - [Caffeine] - Library used for caching.\n\n\n# Links\nHere are some useful links:\n- [BotBlock.org][BotBlock] Site for which this wrapper was made.\n  - [API] API documentation.\n- [Javadoc] Java documentation of the Wrapper.\n- [CodeMC] CI server for dev builds. Those jar files may differ from the ones on bintray.\n- [BotBlock4J] Original Wrapper from which this one originates.\n\n# Contributors\nWe appreciate any contribution from others towards this project.  \nAll contributors are listed on the [contributors.md] file.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotblock%2Fjavabotblockapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbotblock%2Fjavabotblockapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotblock%2Fjavabotblockapi/lists"}