š§ Telegram Bot
āā Like this project? Support my work by giving it a star on GitHub āā
1) Overview
Telegram-Bot is a simple proof of concept Java Spring Boot application designed to get your custom Telegram Bot up and running in minutes. Instead of dealing with confusing setup files and complex integrations, this project handles the basic connection and event tracking right out of the box.
The project can be used to build automated notification systems, manage group chats, or set up custom mobile alerts. This repository gives you a clean baseline to add your own logic and expand capabilities.
2) Getting started
2.1) Prerequisites
- Java Development Kit (JDK) 21 or higher.
- Active internet access on the machine so the application can connect to the Telegram API.
2.2) Build & Execution
- Clone the repository into your local directory
$ git clone https://github.com/zappee/telegram-bot.git $ cd telegram-bot -
Configure environment variables
Open the
src/main/resources/application.propertiesfile and update the following data:- telegram.botToken= Your botās unique secret password. It authenticates your application with Telegramās servers. You get this key from
@BotFatherwhen creating the bot. - telegram.botName= Your botās exact username on Telegram (e.g., MyCoolBot). The code uses this to identify your bot during initial setup and registration.
- telegram.myUserId= Your personal Telegram account ID number. The script uses this to ensure the bot only responds to you (or sends notifications directly to your chat), locking out unauthorized users.
- telegram.botToken= Your botās unique secret password. It authenticates your application with Telegramās servers. You get this key from
- Build and run the project
3) Supported Telegram commands
- Send images directly to your chat.
- Send regular text messages.
- Push external notifications to your Telegram chat using a REST endpoint.
3.1) Telegram commands
-
/start:
-
help:
-
help chuck:
-
Rest endpoint url for send text message to user: http://localhost:8080/api/push
4) Source core
https://github.com/zappee/telegram-bot
5) Contributing
Contributions, feature requests, and optimization are always welcome!