{"id":15044105,"url":"https://github.com/coffee2codenl/telebot","last_synced_at":"2026-04-07T13:31:57.272Z","repository":{"id":57737988,"uuid":"93569028","full_name":"Coffee2CodeNL/Telebot","owner":"Coffee2CodeNL","description":"Java Telegram Bot API, Uses RxJava2 and Retrofit","archived":false,"fork":false,"pushed_at":"2017-07-08T12:41:20.000Z","size":533,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-20T13:23:28.677Z","etag":null,"topics":["java","java-8","retrofit2","rxjava2","rxjava2-retrofit2","telegram-bot-api","telegram-bots"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Coffee2CodeNL.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}},"created_at":"2017-06-06T22:22:50.000Z","updated_at":"2018-02-06T21:22:23.000Z","dependencies_parsed_at":"2022-08-24T14:42:26.722Z","dependency_job_id":null,"html_url":"https://github.com/Coffee2CodeNL/Telebot","commit_stats":null,"previous_names":["isdp/telebot"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coffee2CodeNL%2FTelebot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coffee2CodeNL%2FTelebot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coffee2CodeNL%2FTelebot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coffee2CodeNL%2FTelebot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Coffee2CodeNL","download_url":"https://codeload.github.com/Coffee2CodeNL/Telebot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243451605,"owners_count":20293168,"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":["java","java-8","retrofit2","rxjava2","rxjava2-retrofit2","telegram-bot-api","telegram-bots"],"created_at":"2024-09-24T20:50:05.087Z","updated_at":"2025-12-29T13:59:03.705Z","avatar_url":"https://github.com/Coffee2CodeNL.png","language":"Java","funding_links":["https://www.patreon.com/Coffee2Code"],"categories":[],"sub_categories":[],"readme":"Java Telegram Bot API Library [![Build Status](https://travis-ci.org/iSDP/Telebot.svg?branch=master)](https://travis-ci.org/iSDP/Telebot)\n=======\nThis library is meant to be used to create Telegram bots with ease, while allowing jobs to run in seperate threads.  \nThe whole library is based on RxJava2 and Retrofit.\n\n**Gradle**\n``` \ncompile 'nl.dead-pixel.telebot:telebot:0.3.3'\n```\n\n## Patreon\nIf you feel like it, please take a look at my [Patreon Page](https://www.patreon.com/Coffee2Code)\n\n## How to get support\n[Join the Discord Server](https://discord.gg/KX5n5AM)\n\n## State of the Library\nThis library is currently at version 0.3.3.  \nMost of the Javadocs have been auto-generated and are in need of fixing.  \nI do **NOT** deem it stable, but it's in a state that it can actually receive and send messages, and use most [methods defined in the API](https://github.com/iSDP/Telebot/blob/master/src/main/java/nl/dead_pixel/telebot/api/retrofit/TelegramBotApiService.java).\n\nIf you have any questions, feel free to make an [Issue](https://github.com/iSDP/Telebot/issues/new).  \nThe same goes for bugs and suggestions.\n\n## Documentation\n#### Code sample\n```java\npublic class ExampleBot {\n    private final static String TOKEN = \"\u003cToken Here\u003e\";\n\n    public static void main(String[] args) {\n        org.slf4j.Logger logger = LoggerFactory.getLogger(ExampleBot.class.getSimpleName());\n        Telebot.init(TOKEN, Executors.newFixedThreadPool(4));\n        Telebot.Plugins plugins = new Telebot.Plugins();\n        plugins.addPlugin(new ExamplePlugin())\n                .addPlugin(new AnotherExamplePlugin())\n                .activatePlugins();\n        logger.info(\"Activated Plugins\");\n    }\n}\n```\n#### Explained step by step\n1. Initialize the library  \n    **This must be called before adding plugins!**  \n    ```\n    Telebot.init(TOKEN, Executors.newFixedThreadPool(4));\n    ```\n\n    Where the token is a field in your main class:\n    `private static final String TOKEN = \"\u003cToken here\u003e\"` \n\n2. After that you can start adding Plugins, The main method of using this library, and also the recommended one.\n\n    Create a package named `plugins` and add classes like the following example.  \n    There are some premade plugins below you could use for testing.\n    \n    ##### Plugin Class Example\n    ```java\n    public class ExamplePlugin extends Plugin\u003cMessage\u003e {\n        @Override\n        public void pluginBody(Message message) {\n            // Add your plugin logic here\n        }\n    \n        @Override\n        public Class\u003cMessage\u003e pluginUpdateType() {\n            return Message.class;\n        }\n    }\n    ```\n    \n    As you can see, the above plugin uses the `Message` type, this plugin will only catch messages sent by users in private or in groups.  \n    The following types are available:\n    - `Message`, A plain message sent in a group (Can be a photo, sticker, etc)\n    - `EditedMessage`, An edited message in the group the bot is in.\n    - `CommandMessage`, A `/command` type, so you can filter out regular messages.\n    - `ChannelPost`, A Message posted to a Channel the bot is part of.\n    - `EditedChannelPost`, An edited message posted to the channel the bot is part of.\n    - `CallbackQuery`, An callback query\n    - `InlineQuery`, An inline query\n    - `ChosenInlineResult`, An chosen inline result\n    - `PreCheckoutQuery`, An Pre-Checkout Query.\n    - `ShippingQuery`, An Shipping Query\n\n3. You can then add the plugin to the library:\n    ```\n    Telebot.addPlugin(new ExamplePlugin());\n    ```\n\n4. After you've finished adding the plugins, call the following method:\n    ```\n    Telebot.activatePlugins();\n    ```\n\n## Extras\n#### IntelliJ IDEA Live Template\n```java\npublic class $name$Plugin extends nl.dead_pixel.telebot.plugin.Plugin\u003c$type$\u003e {\n    @java.lang.Override\n    public void pluginBody($type$ update) {\n        $SELECTION$\n        $END$\n    }\n\n    @java.lang.Override\n    public java.lang.Class\u003c$type$\u003e pluginUpdateType() {\n        return $type$.class;\n    }\n}\n```\n#### Javadoc\n[Javadoc](https://isdp.github.io/Telebot/)\n\n## Plugins\n#### Ping Plugin\n```java\npublic class PingPlugin extends Plugin\u003cCommandMessage\u003e {\n    /**\n     * {@inheritDoc}\n     */\n    @Override\n    public void pluginBody(CommandMessage commandMessage) {\n        if (commandMessage.getCommand().equals(\"\")) return;\n\n        if (commandMessage.getCommand().equals(\"ping\")) {\n            log(\"Received command: ping\");\n            MessageRequest messageRequest = new MessageRequest.Builder(commandMessage.getChatId())\n                    .replyTo(commandMessage.getMessage())\n                    .text(\"Pong!\")\n                    .create();\n            ApiService.sendMessage(messageRequest).subscribe(messageApiResponse -\u003e log(\"Pong sent? \" + messageApiResponse.getOk()), Throwable::printStackTrace);\n        }\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    @Override\n    public Class\u003cCommandMessage\u003e pluginUpdateType() {\n        return CommandMessage.class;\n    }\n}\n```\n\n## Roadmap\nThis is a list of the methods and types that still need to be implemented.\n\n#### Methods to be added\n*Currently none*\n\n#### Methods to be fixed\n- [ ] sendChatAction (Needs a Request Body)\n- [ ] sendPhoto (...)\n- [ ] sendAudio (...)\n- [ ] sendDocument (...)\n- [ ] sendSticker (...)\n- [ ] sendVideo (...)\n- [ ] sendVoice (...)\n- [ ] sendVideoNote (...)\n- [ ] sendLocation (...)\n- [ ] sendVenue (...)\n- [ ] sendContact (...)\n- [ ] editMessageCaption (...)\n- [ ] editMessageReplyMarkup (...)\n\n#### Types to be added\n- [ ] InlineQueryResultCachedAudio\n- [ ] InlineQueryResultCachedDocument\n- [ ] InlineQueryResultCachedGif\n- [ ] InlineQueryResultCachedMpeg4Gif\n- [ ] InlineQueryResultCachedPhoto\n- [ ] InlineQueryResultCachedSticker\n- [ ] InlineQueryResultCachedVideo\n- [ ] InlineQueryResultCachedVoice\n- [x] InlineQueryResultArticle\n- [ ] InlineQueryResultAudio\n- [ ] InlineQueryResultContact\n- [ ] InlineQueryResultGame\n- [ ] InlineQueryResultDocument\n- [ ] InlineQueryResultGif\n- [ ] InlineQueryResultLocation\n- [ ] InlineQueryResultMpeg4Gif\n- [ ] InlineQueryResultPhoto\n- [ ] InlineQueryResultVenue\n- [ ] InlineQueryResultVideo\n- [ ] InlineQueryResultVoice\n- [ ] InputLocationMessageContent\n- [ ] InputVenueMessageContent\n- [ ] InputContactMessageContent\n\n#### Types to be fixed\n- [ ] InlineQueryResultArticle\n- [ ] InputTextMessageContent\n\n## License\n    Copyright (C) 2017 Remon Schopmeijer (79147FFF4E3C86DE) \u003csupport-telebot@dead-pixel.nl\u003e\n    \n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n    \n       http://www.apache.org/licenses/LICENSE-2.0\n    \n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoffee2codenl%2Ftelebot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoffee2codenl%2Ftelebot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoffee2codenl%2Ftelebot/lists"}