Compare commits

..

1 Commits

Author SHA1 Message Date
renovate[bot]
daf0ac7b89 Update kotlin monorepo to v2.3.21 2026-04-23 09:01:30 +00:00
36 changed files with 78 additions and 1369 deletions

View File

@@ -1,39 +1,6 @@
# BoostsInfoBot # UserChatShared
A bot that retrieves and displays the boost information for a chat. Showing info about boosts
## Functionality
On `/start`, the bot sends a reply keyboard with a *Request Channel* button. When the user selects
a channel, the bot calls `getUserChatBoosts` and replies with a formatted list of all active boosts
for that user in the selected chat, including the start and expiration dates of each boost.
## Arguments
| Position | Value | Sample | Description |
|----------|-------|--------|-------------|
| 1 | `BOT_TOKEN` | `1234567890:AABBccDDeeFF` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
| Command | Description |
|---------|-------------|
| `/start` | Sends the channel-request keyboard |
## Capabilities
- Reply keyboard with a `RequestChat` button configured for channels
- Retrieves user boost list via `getUserChatBoosts`
- Formats each boost with its add date and expiration date
- Handles `ChatShared` service messages to extract the target chat ID
- Runs via long polling
## Launch ## Launch

View File

@@ -1,55 +1,6 @@
# BusinessConnectionsBot # BusinessConnectionBotBot
A comprehensive bot that demonstrates the Telegram Business Account API, including message When bot connected or disconnected to the business chat, it will notify this chat
management, profile editing, star transfers, story posting, and gift listing.
## Functionality
The bot connects to a business account. When a business connection is established it maps the
business chat ID to the owner's personal chat so that management commands can be used in the
personal chat. Messages received via the business connection are forwarded to the owner.
Typing `PIN` or `UNPIN` in a business message pins or unpins it. A wide set of management commands
is available in the owner's PM.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
| Command | Description |
|---------|-------------|
| `/get_business_account_info` | Print account name, username, bio, and other details |
| `/set_business_account_name` | Set the account's first and last name (prompts for input) |
| `/set_business_account_username` | Set the account's username (prompts for input) |
| `/set_business_account_bio` | Set the account bio (auto-resets to the old value after 15 seconds) |
| `/set_business_account_profile_photo` | Set a private profile photo (send a photo in reply) |
| `/set_business_account_profile_photo_public` | Set a public profile photo (send a photo in reply) |
| `/get_business_account_star_balance` | Show the current star balance of the business account |
| `/transfer_business_account_stars` | Transfer stars from the business account to the bot |
| `/get_business_account_gifts` | List all gifts received by the business account |
| `/post_story` | Post a story with a link area (send a photo in reply) |
| `/delete_story` | Delete the most recently posted story |
## Capabilities
- `BusinessConnection` event handling: maps business chat IDs to personal owner chats
- Forwards business messages to the owner's PM
- PIN / UNPIN keyword detection to pin or unpin messages in the business chat
- Business message deletion tracking
- Mutex-protected concurrent access to the chat mapping
- Story creation with `InputStoryContentPhoto` and `StoryAreaTypeLink`
- Checklist content support
- Runs via long polling
## Launch ## Launch

View File

@@ -1,41 +1,9 @@
# ChatAvatarSetter # ChatAvatarSetter
A bot that updates a group or channel's avatar using a photo sent to the bot. This bot will set the chat avatar based on the image sent to bot
## Functionality
When the bot receives a photo message, it downloads the highest-resolution version of the photo
and sets it as the chat photo for the chat the message was sent from. If the operation fails (e.g.,
due to missing admin rights), the bot sends an error message back to the user.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
None.
## Capabilities
- Downloads the largest available photo size from the incoming message
- Calls `setChatPhoto` to apply the downloaded image as the chat's avatar
- Returns a user-facing error message if the update fails
- Runs via long polling
## Launch ## Launch
```bash ```bash
../gradlew run --args="BOT_TOKEN" ../gradlew run --args="BOT_TOKEN"
``` ```
> **Note:** The bot must be an administrator with *Change group info* permission in the target chat.

View File

@@ -1,42 +0,0 @@
# ChecklistsBot
A bot that handles Telegram premium checklist messages and tracks task completion events.
## Functionality
Listens for messages containing a checklist. When a checklist message is received, the bot sends
a formatted reply showing all tasks with their completion status. It also reacts to task-level
events: when a task is marked as done or a new task is added to an existing checklist, the bot
sends an update reply referencing the affected task.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
None.
## Capabilities
- Detects `ChecklistContent` messages (Telegram Premium feature)
- Formats checklist tasks with ✅ (completed) and ⬜ (pending) indicators
- Handles `ChecklistTasksDone` events — replies when a task is marked complete
- Handles `ChecklistTasksAdded` events — replies when new tasks are appended
- Uses rich text message building for formatted output
- Runs via long polling
## Launch
```bash
../gradlew run --args="BOT_TOKEN"
```

View File

@@ -1,44 +1,6 @@
# CustomBot # CustomBot
A bot that demonstrates custom middleware, custom subcontext data, and several utility features This bot basically have no any useful behaviour, but you may customize it as a playground
of the TelegramBotAPI library.
## Functionality
Shows how to attach a logging middleware to every API request and how to store arbitrary data in
a per-update subcontext. Additionally demonstrates retrieving and sending a user's profile audio
playlist and querying the bot's own star balance.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
| Command | Description |
|---------|-------------|
| `/start` | Retrieves the sender's profile audio files and sends them as an audio media group |
| `/additional_command` | Demo command that accesses and prints custom subcontext data |
| `/getMyStarBalance` | Queries and replies with the bot's current Telegram Star balance |
## Capabilities
- Custom request middleware that logs every outgoing API call
- Custom `BehaviourContext` subcontext with arbitrary stored data
- Profile audio retrieval via `getUserProfilePhotos`-style API for audio
- Audio media group sending (batched uploads)
- Star balance query via `getStarTransactions`
- Channel direct-message configuration tracking via `ChatBoostUpdated` events
- Runs via long polling
## Launch ## Launch

View File

@@ -1,37 +1,6 @@
# DeepLinksBot # DeepLinksBot
A bot that generates and handles Telegram deep links. This bot will send you deeplink to this bot when you send some text message and react on the `start` button
## Functionality
Generates a deep link to the bot when the user sends any text message. When a deep link is followed
(i.e., the `/start` command is received with a payload), the bot confirms what payload was received.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
| Command | Description |
|---------|-------------|
| `/start` | Displays a help/welcome message; also handles deep-link payloads |
## Capabilities
- Requires a registered bot username (validates that `getMe` returns a username)
- Generates a `t.me/<username>?start=<payload>` deep link from any incoming text message
- Subscribes to deep-link follow events with `waitDeepLinks()` and confirms the received payload
- Runs via long polling
## Launch ## Launch

View File

@@ -1,37 +1,6 @@
# DraftsBot # Drafts bot
A bot that demonstrates the message-draft flow API by progressively revealing text to the user. The main purpose of this bot is just to answer "Oh, hi, " and add user mention here
## Functionality
On `/test_draft_flow`, the bot sends a series of draft text updates to the user, each building
on the previous one, before committing the final message. This illustrates how to use the draft
message API to stream partial content before finalising it.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
| Command | Description |
|---------|-------------|
| `/test_draft_flow` | Starts a draft-message flow that progressively reveals text |
## Capabilities
- Uses the `draftFlow` / `sendDraftMessage` API to emit incremental text updates
- Demonstrates the difference between draft (editable intermediate state) and final message
- Runs via long polling
## Launch ## Launch

View File

@@ -1,41 +1,7 @@
# FSMBot # FSM
A demonstration of the Finite State Machine (FSM) pattern provided by the This bot contains an example of working with FSM included in project
[MicroUtils](https://github.com/InsanusMokrassar/MicroUtils) library. [MicroUtils](https://github.com/InsanusMokrassar/MicroUtils)
## Functionality
Implements a simple two-state FSM. After `/start` is sent, the bot enters
`ExpectContentOrStopState` and re-sends every message it receives back to the user.
This continues until the user sends `/stop`, at which point the FSM transitions to
`StopState` and content forwarding ends.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
| Command | Description |
|---------|-------------|
| `/start` | Starts the FSM loop — bot begins echoing content back to the user |
| `/stop` | Ends the FSM loop — bot stops echoing |
## Capabilities
- Two-state FSM: `ExpectContentOrStopState``StopState`
- `ExpectContentOrStopState` uses `expectContentOrCommands()` to filter messages
- Erroneous FSM states are caught and handled gracefully
- Runs via long polling
## Launch ## Launch

View File

@@ -1,48 +1,9 @@
# FilesLoaderBot # FilesLoaderBot
A bot that downloads any media file sent to it and then re-uploads it back to the chat. This bot will download incoming files
## Functionality
For every message containing a file (photo, video, audio, document, sticker, animation, voice,
video note, etc.), the bot downloads the file to a local directory, then sends the file back to
the chat. Media groups are expanded and each file is re-sent individually. While processing, the
bot sends an appropriate "upload" chat action (e.g., *uploading video*, *uploading photo*).
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
| 2 *(optional)* | `/path/to/dir` | Directory where files are saved (defaults to `/tmp/`) |
Optional flags (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
| Command | Description |
|---------|-------------|
| `/start` | Sends a usage instruction message |
## Capabilities
- Supports all Telegram media types: photos, videos, audio, documents, stickers, animations, voice messages, video notes
- Handles media groups by iterating over each item and re-uploading it individually
- Sends contextually appropriate chat actions during upload (typing, upload_video, upload_audio, etc.)
- Logs the local file path after each download
- Runs via long polling
## Launch ## Launch
```bash ```bash
# Default directory (/tmp/) ../gradlew run --args="BOT_TOKEN[ optional/folder/path]"
../gradlew run --args="BOT_TOKEN"
# Custom directory
../gradlew run --args="BOT_TOKEN /path/to/save/dir"
``` ```

View File

@@ -1,36 +1,6 @@
# ForwardInfoSenderBot # ForwarderBot
A bot that analyses the origin of forwarded messages and prints detailed information about the forwarder. The main purpose of this bot is just to send info about forwarder when bot receive any update
## Functionality
For every message that was forwarded to the bot, it inspects the forward metadata and sends back a
formatted reply describing who or what originally sent the message: a regular user, a bot, a channel,
or an anonymous/hidden sender. Premium status, user IDs, and usernames are included where available.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
None.
## Capabilities
- Identifies forwarder type: regular user, bot, public channel, anonymous group admin, or hidden user
- Displays premium user status, numeric IDs, and usernames using `code` and hyperlink entities
- Re-sends the original message content alongside the metadata reply
- Runs via long polling
## Launch ## Launch

View File

@@ -1,44 +0,0 @@
# GiftsBot
A bot that retrieves and displays all gifts received by a user, chat, or business account.
## Functionality
On `/start`, the bot fetches gifts from multiple sources (user gifts, chat gifts, business account
gifts) and sends a formatted summary to the user. Each gift is described with its type (regular or
unique, standard or business-owned) and relevant metadata.
## Arguments
| Position | Value | Sample | Description |
|----------|-------|--------|-------------|
| 1 | `BOT_TOKEN` | `1234567890:AABBccDDeeFF` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
| Command | Description |
|---------|-------------|
| `/start` | Fetch and display all gifts for the requesting user |
## Capabilities
- Retrieves user gifts via `getUserGifts`
- Retrieves chat gifts via `getChatGifts`
- Retrieves business account gifts via `getBusinessAccountGifts`
- Distinguishes between regular gifts and unique gifts
- Distinguishes between standard (user-owned) and business-owned gifts
- Paginates through the full gift list
- Runs via long polling
## Launch
```bash
../gradlew run --args="BOT_TOKEN"
```

View File

@@ -1,37 +1,6 @@
# GiveawaysBot # CustomBot
A bot that monitors and logs all giveaway lifecycle events in chats. Printing giveaways
## Functionality
Listens for Telegram giveaway service messages and logs each event to standard output. No
interactive commands are provided; the bot is purely an observer/logger for giveaway activity.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
None.
## Capabilities
- Detects and logs giveaway creation events (`GiveawayCreated`)
- Detects and logs giveaway completion events with results (`Giveaway` with results)
- Detects and logs winner announcement messages (`GiveawayWinners`)
- Detects content messages that contain giveaway information (`GiveawayPublicResults`)
- All events are printed to stdout for inspection
- Runs via long polling
## Launch ## Launch

View File

@@ -1,36 +1,6 @@
# HelloBot # HelloBot
A minimal bot that responds whenever someone mentions the bot's username in a chat. The main purpose of this bot is just to answer "Oh, hi, " and add user mention here
## Functionality
Listens for any message that contains the bot's username mention. When triggered, replies with
`Oh, hi, ` followed by a mention of the sender (or the group/channel name for non-private chats).
Uses MarkdownV2 formatting and adapts the reply text based on the chat type.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
None. The bot is triggered by username mentions, not commands.
## Capabilities
- Detects mentions of the bot username in all chat types (private, group, supergroup, channel, business)
- Builds a MarkdownV2-formatted reply that links back to the sender
- For public chats the reply contains a clickable mention link; for private chats it uses a text mention
- Runs via long polling
## Launch ## Launch

View File

@@ -1,38 +1,6 @@
# InlineQueriesBot # InlineQueriesBot
A multiplatform bot that answers inline queries with paginated article results. This bot will form the inline queries for you. For that feature you should explicitly enable inline queries in bot settings
## Functionality
Responds to inline queries by returning a page of article results. Each result includes a
description and a deep-link button. Navigation between pages is handled via the query offset
(next/previous buttons encoded in the result set).
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
None. The bot is driven by inline queries (type `@BotUsername` in any chat).
## Capabilities
- Answers inline queries with `InlineQueryResultArticle` items
- Offset-based pagination: each result page encodes the next-page offset in the answer
- Each result includes a deep-link `InlineKeyboardButton` back to the bot
- Multiplatform module with a shared `commonMain` implementation and a JVM launcher entry point
- Requires *Inline Mode* to be enabled in BotFather settings
- Runs via long polling
## Launch ## Launch

View File

@@ -1,47 +0,0 @@
# KeyboardsBot
A multiplatform bot (JVM + JS) that demonstrates inline keyboard pagination and various button types.
## Functionality
On `/inline <page> <count>`, the bot sends an inline keyboard built from `count` items starting
at `page`. The keyboard includes previous/next navigation buttons, copy-text buttons, styled
action buttons, and an inline-query chosen-chat button. Callback queries from the buttons navigate
between pages.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional flags (any order):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
| Command | Arguments | Description |
|---------|-----------|-------------|
| `/inline` | `<page> <count>` | Send a paginated inline keyboard starting at `page` with `count` items per page |
## Capabilities
- Multi-page inline keyboard navigation (previous / next buttons encoded as callback data)
- Copy-text buttons (`CopyTextButton`)
- Styled action buttons: Primary, Success, Danger colour variants
- Inline query chosen-chat button (`SwitchInlineQueryChosenChat`)
- Answers inline queries that originate from the keyboard buttons
- Shared `commonMain` library with JVM and JS launchers
- Runs via long polling
## Launch
### JVM
```bash
./gradlew :KeyboardsBot:jvm_launcher:run --args="BOT_TOKEN"
```

View File

@@ -1,43 +1,6 @@
# LinkPreviewsBot # ReactionsInfoBot
A bot that demonstrates all `LinkPreviewOptions` variants by replying with multiple messages, each This bot will resend messages with links with all variants of `LinkPreviewOptions`
using a different link preview style.
## Functionality
When the user sends a message containing a URL, the bot extracts the URL and sends several reply
messages, each with a different `LinkPreviewOptions` configuration: disabled, small preview above
text, large preview above text, small preview below text, large preview below text, and the default
(no explicit options).
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
None.
## Capabilities
- Extracts URLs from the text entities of incoming messages
- Sends one reply per `LinkPreviewOptions` variant:
- Preview disabled
- Small image, positioned above text
- Large image, positioned above text
- Small image, positioned below text
- Large image, positioned below text
- Default (Telegram-chosen behaviour)
- Runs via long polling
## Launch ## Launch

View File

@@ -1,39 +1,6 @@
# LiveLocationsBot # LiveLocationsBot
A bot that sends a live location and updates it periodically until the user cancels. This bot will send you live location and update it from time to time
## Functionality
On `/start`, the bot sends a live location message with an inline *Cancel* button. A coroutine then
updates the location every 3 seconds with a slightly changing coordinate. When the user presses
*Cancel* the update loop is stopped and the live location is closed.
## Arguments
| Position | Value | Sample | Description |
|----------|-------|--------|-------------|
| 1 | `BOT_TOKEN` | `1234567890:AABBccDDeeFF` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Sample | Description |
|-------|--------|-------------|
| `debug` | `debug` | Enable verbose debug logging |
| `testServer` | `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
| Command | Description |
|---------|-------------|
| `/start` | Sends a live location message and starts the position update loop |
## Capabilities
- Sends an initial live location using `sendLiveLocation`
- Updates the location every 3 seconds via `editLiveLocation` in a background coroutine
- Inline keyboard with a *Cancel* callback button
- Handles the cancel callback to stop the update loop and close the live location
- Runs via long polling
## Launch ## Launch

View File

@@ -1,47 +0,0 @@
# ManagedBotsBot
A bot that demonstrates the Managed Bots API: creating child bots and replacing their tokens.
## Functionality
Allows the operator to check whether the bot supports managed bots, create new managed bots via a
keyboard button, and replace an existing managed bot's token. When a managed bot is created its
token is sent back to the operator. The bot also demonstrates custom middleware and subcontext usage.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
| Command | Description |
|---------|-------------|
| `/canManageBots` | Check whether this bot has the ability to create managed bots |
| `/keyboard` | Send a reply keyboard with a *Create managed bot* button |
| `/replaceToken` | Replace the token of a managed bot (send as reply to the bot's token message) |
## Capabilities
- Queries bot capabilities via `getMe` extended fields
- Creates a managed child bot via the `BotKeyboardButton` with `RequestBot` type
- Receives the new bot's info in a `BotShared` service message
- Replaces a managed bot's token via `replaceStickerInSet` (token replacement API)
- Handles `ManagedBotUpdated` events for tracking child bot status changes
- Custom request middleware for logging
- Custom `BehaviourContext` subcontext
- Runs via long polling
## Launch
```bash
../gradlew run --args="BOT_TOKEN"
```

View File

@@ -1,39 +1,7 @@
# MemberUpdatedWatcherBot # MemberUpdatedWatcherBot
A bot that monitors all `ChatMemberUpdated` events and sends descriptive notifications to the chat. This bot will watch for some ChatMemberUpdated events using new extensions from 18.0.0
## Functionality
Watches for every member status change in all chats the bot is a member of: bot additions,
admin promotions and demotions, user joins and leaves, and permission restriction changes.
For each event the bot sends a human-readable message describing what changed.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
None.
## Capabilities
- Detects when the bot itself is added to or removed from a chat and sends a greeting/farewell
- Detects when the bot is promoted to or demoted from administrator
- Detects when any user joins or leaves the chat
- Detects when any user is promoted to or demoted from administrator
- Detects granular permission changes (e.g., restrictions added or lifted)
- Uses the `ChatMemberUpdated` extension functions introduced in TelegramBotAPI 18.0.0
- Runs via long polling
## Launch ## Launch

View File

@@ -1,36 +1,6 @@
# MyBot # GetMeBot
A bot that monitors messages containing its username and responds with a contextual link or mention. This is one of the most easiest bot - it will just print information about itself
## Functionality
Watches every incoming message for a mention of the bot's username. When found, it replies with a
MarkdownV2-formatted message that includes a link or text mention pointing back to the originating
chat or user, adapting the reply to the type of chat the message came from.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
None. The bot reacts to username mentions, not to commands.
## Capabilities
- Handles all chat types: private, group, supergroup, channel, business connection chats, channel groups
- For public chats builds a `t.me/<username>` hyperlink; for private chats uses an inline text mention
- Prints information about the originating chat using `getChat`
- Runs via long polling
## Launch ## Launch

View File

@@ -1,45 +1,8 @@
# PollsBot # PollsBot
A bot that demonstrates creation and management of Telegram polls (anonymous, public, and quiz). This bot will send test poll in the chat where commands will be received. Commands:
## Functionality
Creates polls on demand and tracks live answer updates. Users can reply to an existing poll message
to add new options or remove the last option. Quiz polls are created with a random correct answer.
Custom emoji stickers in poll options are supported.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
| Command | Description |
|---------|-------------|
| `/anonymous` | Create an anonymous poll |
| `/public` | Create a public poll; users can add options by replying |
| `/quiz` | Create a quiz poll with a randomly chosen correct answer |
All three commands accept an optional custom emoji ID as an extra argument to use in poll option text.
## Capabilities
- Mutex-protected in-memory poll registry to safely track concurrent updates
- Live poll answer updates via `onPollUpdated` handler
- Reply-based option management: reply to a poll message with text to add an option, or reply with `/remove` to delete the last option
- Quiz polls: random correct answer selection, answer explanation included
- Custom emoji in poll option text
- Registers all three commands with Telegram (`setMyCommands`)
- Runs via long polling
## Launch ## Launch

View File

@@ -1,53 +1,9 @@
# RandomFileSenderBot # RandomFileSenderBot
A multiplatform bot (JVM + Native) that picks random files from a directory and sends them to the This bot will send random file from input folder OR from bot working folder
requester.
## Functionality
Picks one or more files at random from a specified directory and sends them to the user. Multiple
files are batched into a media group. Files are sent as protected content. The bot is implemented
as a shared library with separate JVM and Native launcher entry points.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
| 2 *(optional)* | `/path/to/dir` | Directory to pick files from (defaults to the current working directory) |
Optional flags (any order):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
| Command | Description |
|---------|-------------|
| `/send_file` | Send 1 random file from the configured directory |
| `/send_file N` | Send *N* random files from the configured directory |
## Capabilities
- Platform-specific random file selection (JVM uses `java.io.File`, Native uses POSIX directory API)
- Groups multiple files into a single media group message when N > 1
- Files are sent as protected content (forwarding disabled)
- Multiplatform: shared logic in `commonMain`, launchers in `jvm_launcher` and `native_launcher`
- Runs via long polling
## Launch ## Launch
### JVM
```bash ```bash
./gradlew :RandomFileSenderBot:jvm_launcher:run --args="BOT_TOKEN /optional/path" ../gradlew run --args="BOT_TOKEN[ optional/folder/path]"
```
### Native (after build)
```bash
./RandomFileSenderBot/native_launcher/build/bin/native/releaseExecutable/native_launcher.kexe BOT_TOKEN /optional/path
``` ```

View File

@@ -1,38 +1,6 @@
# ReactionsInfoBot # ReactionsInfoBot
A bot that tracks message reactions and reports them back to the user. This bot will send info about user reactions in his PM with reply to message user reacted to
## Functionality
Monitors reaction updates in the bot's private chat. When a user adds or removes a reaction on a
message, the bot replies to that message with a formatted summary of the current reactions.
The bot also sets a reaction emoji on incoming messages to acknowledge them.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
None.
## Capabilities
- Handles `MessageReactionUpdated` events (per-user reaction changes)
- Handles `MessageReactionCountUpdated` events (aggregate reaction counts)
- Identifies reaction types: standard emoji, custom emoji, paid reactions
- Replies to the reacted-to message with a formatted list of current reactions
- Sets a reaction on received messages using `setMessageReaction`
- Runs via long polling
## Launch ## Launch

View File

@@ -1,48 +0,0 @@
# ResenderBot
A multiplatform bot (JVM + Native + JS) that echoes every content message back to the sender.
## Functionality
For every content message the bot receives, it immediately re-sends the same content back to the
originating chat. Reply quotes and message effects are preserved. The bot is implemented as a
shared library (`ResenderBotLib`) with separate launcher modules for JVM and Native targets.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional flags (any order):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
None.
## Capabilities
- Re-sends any content message (text, photo, video, audio, document, sticker, etc.)
- Preserves `reply_to_message` quote when the original message was a reply
- Preserves `effect_id` (message effects / animations)
- Shared `commonMain` implementation across JVM, Native, and JS targets
- Runs via long polling
## Launch
### JVM
```bash
./gradlew :ResenderBot:jvm_launcher:run --args="BOT_TOKEN"
```
### Native (after build)
```bash
./ResenderBot/native_launcher/build/bin/native/releaseExecutable/native_launcher.kexe BOT_TOKEN
```

View File

@@ -1,50 +1,12 @@
# RightsChangerBot # RightsChanger
A bot for managing user permissions and administrator rights in Telegram groups and channels. All the commands should be called with reply to some common user.
## Functionality * Use `/simple` with bot to get request buttons for non-independent permissions change
* Use `/granular` with bot to get request buttons for independent permissions change
Provides two modes of permission editing (simple / granular) for regular member restrictions, and a
full FSM-based flow for editing channel administrator rights. Changes are presented as inline
keyboards with visual ✅/❌ toggles that persist until the user is done.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
| 2 | `ADMIN_USER_ID` | Numeric Telegram user ID allowed to use the bot |
Optional flags (any order after the required arguments):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
| Command | Description |
|---------|-------------|
| `/simple` | Show a common-permissions keyboard (send messages, polls, web previews, etc.) for the replied-to user |
| `/granular` | Show a granular-permissions keyboard (individual media types) for the replied-to user |
| `/rights_in_channel` | Start the FSM flow to pick a channel and a user, then edit that user's administrator rights in the channel |
All commands must be sent as a **reply** to a target user's message.
## Capabilities
- **Simple mode** — toggles grouped permissions: send messages, send media, send polls, send other content, add web page previews, change info, invite users, pin messages
- **Granular mode** — toggles individual media-type permissions: audios, documents, photos, videos, video notes, voice notes, stickers, animations, games, gift premiums, forward channels, forward non-channels
- **Channel admin rights** — FSM with three states:
1. `RetrievingChannelChatState` — user picks the channel
2. `RetrievingUserIdChatState` — user picks the member
3. `RetrievingChatInfoDoneState` — inline keyboard for toggling admin rights (post messages, edit messages, delete messages, ban users, invite users, pin messages, manage topics, manage video chats, post stories, edit stories, delete stories, remain anonymous)
- Inline keyboard callbacks update permission state in real time
- Runs via long polling
## Launch ## Launch
```bash ```bash
../gradlew run --args="BOT_TOKEN ADMIN_USER_ID" ../gradlew run --args="BOT_TOKEN allowed_user_id_long"
``` ```

View File

@@ -1,35 +1,6 @@
# SlotMachineDetectorBot # SlotMachineDetectorBot
A bot that detects slot-machine dice rolls and reports the result. This bot must reply with information about slot machine answer
## Functionality
Listens for dice messages of the *SlotMachine* type. When one is received, it calculates the
combination shown on the three reels and replies with the formatted result.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
None.
## Capabilities
- Filters incoming dice messages specifically for the slot-machine emoji type
- Decodes the numeric dice value into the three reel symbols
- Replies with a human-readable description of the result
- Runs via long polling
## Launch ## Launch

View File

@@ -1,46 +1,9 @@
# StarTransactionsBot # StarTransactionsBot
A bot that demonstrates Telegram Stars payments: sending invoices, handling transactions, and This bot basically have no any useful behaviour, but you may customize it as a playground
delivering paid media.
## Functionality
Sends a 1-star invoice on `/start`. After successful payment the bot sends paid media (a photo
and a video). The admin can browse the full transaction history with pagination. Refunds received
from Telegram are logged. Checkout queries are validated before approval.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
| 2 | `ADMIN_USER_ID` | Numeric Telegram user ID that is allowed to view transaction history |
Optional flags (any order after the required arguments):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
| Command | Description |
|---------|-------------|
| `/start` | Send a 1-star invoice to the user |
| `/transactions` | Browse paginated star transaction history *(admin only)* |
## Capabilities
- Creates and sends a Stars invoice via `sendInvoice`
- Handles `PreCheckoutQuery` events to approve or reject checkout
- Delivers paid media (photo + video) after a successful payment
- Paginates transaction history using inline keyboard next/previous buttons
- Tracks and logs refund notifications
- Runs via long polling
## Launch ## Launch
```bash ```bash
../gradlew run --args="BOT_TOKEN ADMIN_USER_ID" ../gradlew run --args="BOT_TOKEN"
``` ```

View File

@@ -1,44 +0,0 @@
# StickerInfoBot
A multiplatform bot (JVM + JS) that displays detailed information about stickers and custom emoji.
## Functionality
When the user sends a sticker, the bot replies with the sticker set name, title, and sticker type.
When the user sends a text message containing custom emoji entities, the bot fetches the
corresponding sticker objects and sends back their information.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional flags (any order):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
None.
## Capabilities
- Detects incoming sticker messages and calls `getStickerSet` to retrieve set metadata
- Reports sticker set name, title, and type (regular / mask / custom emoji)
- Scans text message entities for `CustomEmoji` types
- Fetches the corresponding sticker objects via `getCustomEmojiStickers`
- Sends sticker information back as a formatted reply
- Shared `commonMain` library with JVM and JS launchers
- Runs via long polling
## Launch
### JVM
```bash
./gradlew :StickerInfoBot:jvm_launcher:run --args="BOT_TOKEN"
```

View File

@@ -1,46 +1,9 @@
# StickerSetHandler # StickerSetHandler
A bot that builds and manages a personal sticker set for each user from stickers they send. Send sticker to this bot to form your own stickers set. Send /delete to delete this sticker set
## Functionality ## How to run
When a user sends a sticker, the bot extracts its emoji and adds it to a per-user sticker set
named `<user_id>_by_<bot_username>`. If the set does not yet exist, it is created first. The bot
supports regular, mask, and custom emoji sticker sets, determined by the type of the first sticker
added. Sending `/delete` removes the user's entire sticker set.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
| Command | Description |
|---------|-------------|
| `/start` | Sends a welcome message explaining how to use the bot |
| `/delete` | Deletes the user's personal sticker set created by this bot |
## Capabilities
- Per-user sticker set with a deterministic name based on user ID and bot username
- Automatic sticker set creation on first sticker received
- Supports all sticker set types: regular, mask, custom emoji
- Emoji extraction from incoming stickers
- Sticker added to an existing set via `addStickerToSet`
- Set deletion via `deleteStickerSet`
- Runs via long polling
## Launch
```bash ```bash
../gradlew run --args="BOT_TOKEN" ./gradlew run --args="TOKEN"
``` ```

View File

@@ -1,43 +1,9 @@
# SuggestedPosts # StickerSetHandler
A bot that handles the channel Direct Messages (suggested post) approval flow. Send sticker to this bot to form your own stickers set. Send /delete to delete this sticker set
## Functionality ## How to run
Monitors suggested post events in a channel connected via Direct Messages. When a post is
suggested, the bot automatically schedules a decline after a short delay (demonstrating the
decline flow). Paid post events and approval/decline confirmations are also tracked and logged.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
| Command | Description |
|---------|-------------|
| `/start` | Initialises the bot and confirms it is running |
## Capabilities
- Handles `SuggestedPostApproved` events
- Handles `SuggestedPostDeclined` events
- Handles `SuggestedPostPaid` and `SuggestedPostRefunded` events
- Handles `SuggestedPostApprovalFailed` errors
- Automatically declines new suggestions after a configurable delay to demonstrate the decline API
- Runs via long polling
## Launch
```bash ```bash
../gradlew run --args="BOT_TOKEN" ./gradlew run --args="TOKEN"
``` ```

View File

@@ -1,46 +0,0 @@
# TagsBot
A bot that manages custom member tags in Telegram groups.
## Functionality
Allows administrators to assign custom text tags to group members, remove tags, and grant or
revoke the *manage tags* permission. All tag-related commands require the command to be sent as a
reply to the target member's message.
## Arguments
| Position | Value | Sample | Description |
|----------|-------|--------|-------------|
| 1 | `BOT_TOKEN` | `1234567890:AABBccDDeeFF` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Sample | Description |
|-------|--------|-------------|
| `debug` | `debug` | Enable verbose debug logging |
| `testServer` | `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
| Command | Description |
|---------|-------------|
| `/setChatMemberTag <tag>` | Set a custom tag on the replied-to member |
| `/removeChatMemberTag` | Remove the custom tag from the replied-to member |
| `/setCanManageTags <true\|false>` | Grant (`true`) or revoke (`false`) the *manage tags* admin right for the replied-to member |
All commands must be sent as a **reply** to the target user's message.
## Capabilities
- Sets custom tags on group members via `setChatMemberTag`
- Removes tags via `removeChatMemberTag`
- Promotes members with tag management permission via `promoteChatMember`
- Reads existing tag information through the Risk API (`getChatMember`)
- Runs via long polling
## Launch
```bash
../gradlew run --args="BOT_TOKEN"
```

View File

@@ -1,50 +1,9 @@
# TopicsHandling # HelloBot
A bot that demonstrates full forum-topic management for Telegram supergroups with forum mode enabled. The main purpose of this bot is just to answer "Oh, hi, " and add user mention here
## Functionality
Provides commands to create, edit, close, reopen, and delete forum topics. Also handles the general
topic (hide/unhide, close/reopen, pin/unpin messages) and listens for all topic lifecycle events,
logging each one.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
| Command | Description |
|---------|-------------|
| `/start_test_topics` | Runs a full test sequence: creates a topic, edits its name and icon, pins a message, closes and reopens it, then deletes it |
| `/delete_topic` | Deletes the forum topic in which the command was sent |
| `/unpin_all_forum_topic_messages` | Unpins all messages in the current forum topic |
## Capabilities
- Creates colour-coded forum topics with a custom emoji icon
- Edits topic name and icon
- Closes and reopens topics
- Deletes topics
- Manages the general (default) topic: hide, unhide, close, reopen
- Pins and unpins messages within a topic
- Detects and logs topic creation, editing, closure, reopening, and general-topic visibility changes
- Detects private forum support and enables private topics when available
- Runs via long polling
## Launch ## Launch
```bash ```bash
../gradlew run --args="BOT_TOKEN" ../gradlew run --args="BOT_TOKEN"
``` ```
> **Note:** The bot must be an administrator with *Manage Topics* permission in the target supergroup.

View File

@@ -1,41 +1,6 @@
# UserChatShared # UserChatShared
A bot that demonstrates the `RequestUsers` and `RequestChat` keyboard button types, letting users Use `/start` with bot to get request buttons. Bot will ask you to choose user/chat from your list and send it to him.
share user or chat contacts with the bot.
## Functionality
On `/start`, the bot sends a reply keyboard containing various request buttons. When the user taps
one of these buttons, Telegram opens a picker and the selected user(s) or chat is shared back with
the bot. The bot then logs and replies with the received share information.
## Arguments
| Position | Value | Sample | Description |
|----------|-------|--------|-------------|
| 1 | `BOT_TOKEN` | `1234567890:AABBccDDeeFF` | Telegram bot token |
Optional arguments (any order after the token):
| Value | Sample | Description |
|-------|--------|-------------|
| `debug` | `debug` | Enable verbose debug logging |
| `testServer` | `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
| Command | Description |
|---------|-------------|
| `/start` | Sends the reply keyboard with all request buttons |
## Capabilities
- `RequestUsers` buttons for: any single user, premium user, non-premium user, multiple users
- `RequestChat` buttons for: any channel, any group, a forum group, a group with specific privacy/creator requirements
- Buttons can optionally request the user's/chat's photo, name, and username
- Unique request IDs are assigned to each button to distinguish responses
- Handles `UserShared` and `ChatShared` service messages and replies with the received data
- Runs via long polling
## Launch ## Launch

View File

@@ -1,59 +1,17 @@
# WebApp # WebApp
A multiplatform bot (JVM server + JS WebApp) that demonstrates Telegram WebApp integration. Here you may find simple example of `WebApp`. For work of this example you will need one of two things:
## Functionality * Your own domain with SSL (letsencrypt is okay)
* Test account in telegram
The JVM part hosts a Ktor HTTP server that serves a static WebApp frontend and exposes REST What is there in this module:
endpoints for inline query submission, WebApp data validation, custom emoji status setting, and
prepared keyboard button management. The JS part is the WebApp itself — a single-page app with a
button that communicates back to the bot and adapts to the user's Telegram theme and viewport.
## Arguments * JVM part of this example is a server with simple static webapp sharing and bot which just gives the webapp button to open webapp
* JS part is the WebApp with one button and reacting to chaged user theme and app viewport
| Position | Value | Description | ## How to run
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
| 2 | `WEB_APP_URL` | Public HTTPS URL where the WebApp is hosted |
| 3 *(optional)* | `PORT` | Port for the Ktor server (default: `8080`) |
Optional flags:
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
## Bot Commands
| Command | Description |
|---------|-------------|
| `/reply_markup` | Send a reply keyboard containing a WebApp button |
| `/inline` | Send an inline keyboard containing a WebApp button |
| `/attachment_menu` | Send an attachment-menu WebApp button |
| `/prepareKeyboard` | Retrieve and display the saved prepared inline keyboard button |
## Server Endpoints
| Method | Path | Description |
|--------|------|-------------|
| `POST` | `/inline` | Accept an inline query result submitted from the WebApp |
| `POST` | `/check` | Validate the `initData` signature sent by the WebApp |
| `POST` | `/setCustomEmoji` | Set a custom emoji status for the user based on WebApp data |
| `POST` | `/getPreparedKeyboardButtonId` | Return the ID of a previously saved prepared inline keyboard button |
## Capabilities
- Serves the compiled JS WebApp as static files
- HMAC-SHA256 validation of Telegram WebApp `initData`
- Custom emoji status setting via `setUserEmojiStatus`
- Prepared inline keyboard button saved with `savePreparedInlineMessage`
- Supports all three WebApp button surfaces: reply keyboard, inline keyboard, attachment menu
- Requires a domain with valid SSL (or a Telegram test account)
- JVM server + Kotlin/JS frontend in a single Gradle multiplatform project
## Launch
```bash ```bash
./gradlew :WebApp:run --args="BOT_TOKEN https://your.domain.com 8080" ./gradlew run --args="TOKEN WEB_APP_ADDRESS"
``` ```

View File

@@ -1,53 +1,28 @@
# WebHooks # WebHooks
A bot that uses a Telegram webhook instead of long polling, served via an embedded Ktor HTTP server. Launches webhook-based simple bot. Use `/start` with bot to get simple info about webhooks
## Functionality
Registers a webhook URL with Telegram, starts a Ktor server on the configured port, and processes
incoming updates through that server. Responds to `/start` with information about the active webhook
configuration.
## Arguments
| Position | Value | Description |
|----------|-------|-------------|
| 1 | `BOT_TOKEN` | Telegram bot token |
| 2+ | `https://...` | One or more HTTPS URLs to register as the webhook URL |
Additional optional arguments (any order, after token and URL):
| Value | Description |
|-------|-------------|
| `debug` | Enable verbose debug logging |
| `testServer` | Connect to the Telegram test server instead of production |
| *any number* | Port to listen on (e.g. `8080`); defaults to `8080` |
| *any other string* | Sub-path to mount the webhook route on (e.g. `it/is/subpath`) |
### Example
```
BOT_TOKEN https://sample.com it/is/subpath 8080
```
- Webhook registered as `https://sample.com/it/is/subpath`
- Ktor listens on `0.0.0.0:8080` at path `/it/is/subpath`
## Bot Commands
| Command | Description |
|---------|-------------|
| `/start` | Replies with current webhook URL and configuration details |
## Capabilities
- Full webhook integration via `setWebhook` + Ktor route
- Configurable listening port and sub-path
- Optional debug mode
- Runs via Ktor embedded server (not long polling)
## Launch ## Launch
```bash ```bash
../gradlew run --args="BOT_TOKEN https://sample.com it/is/subpath 8080" ../gradlew run --args="BOT_TOKEN https://sample.com it/is/subpath 8080 debug"
``` ```
Required arguments:
1. Token
2. Arguments starting with `https://`
Optional arguments:
* Any argument == `debug` to enable debug mode
* Any argument **not** starting with `https://` and **not** equal to `debug` as **subpath** (will be used as
subroute to place listening of webhooks)
* Any argument as number of port
Sample: `TOKEN https://sample.com it/is/subpath 8080` will result to:
* `TOKEN` used as token
* Bot will set up its webhook info as `https://sample.com/it/is/subpath`
* Bot will set up to listen webhooks on route `it/is/subpath`
* Bot will start to listen any incoming request on port `8080` and url `0.0.0.0`

View File

@@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx3148m
kotlin.daemon.jvmargs=-Xmx3g -Xms500m kotlin.daemon.jvmargs=-Xmx3g -Xms500m
kotlin_version=2.3.20 kotlin_version=2.3.21
telegram_bot_api_version=33.0.0 telegram_bot_api_version=33.0.0
micro_utils_version=0.29.1 micro_utils_version=0.29.1
serialization_version=1.10.0 serialization_version=1.10.0