update readmes

This commit is contained in:
2026-08-21 15:51:06 +06:00
parent 016400a821
commit ce48393895
104 changed files with 2615 additions and 333 deletions

View File

@@ -1,9 +1,43 @@
# CustomBot
# GiveawaysBot
Printing giveaways
A long-polling example that prints giveaway-related Telegram updates to standard output.
## Launch
## Behavior
At startup, the bot calls `getMe` and prints its own user information. It then prints
updates matched by these TelegramBotAPI handlers:
- `onGiveawayCreated` — a giveaway was created;
- `onGiveawayCompleted` — a giveaway was completed;
- `onGiveawayWinners` — the giveaway winners were published;
- `onGiveawayContent` — a message contains giveaway content.
The bot sends no replies and defines no bot commands.
## Setup and permissions
1. Obtain a bot token and keep it private.
2. Add the bot to every chat whose giveaway updates it should observe, with enough
access for Telegram to deliver those updates.
The example does not call admin-only methods, store data, or configure a webhook.
## Run
From the repository root:
```bash
../gradlew run --args="BOT_TOKEN"
./gradlew :GiveawaysBot:run --args="BOT_TOKEN"
```
The first argument is always the required bot token. Optional, case-sensitive flags
may follow it in either order:
- `debug` enables TelegramBotAPI diagnostic logging on standard output;
- `testServer` connects to Telegram's Bot API test environment.
For example:
```bash
./gradlew :GiveawaysBot:run --args="BOT_TOKEN debug testServer"
```