https://github.com/nsat1/cloud-saving-bot
Telegram bot on Python aiogram to save files to Yandex Disk from certain users.
https://github.com/nsat1/cloud-saving-bot
aiogram docker docker-compose python telegram-bot yandex-disk
Last synced: 3 months ago
JSON representation
Telegram bot on Python aiogram to save files to Yandex Disk from certain users.
- Host: GitHub
- URL: https://github.com/nsat1/cloud-saving-bot
- Owner: nsat1
- License: mit
- Created: 2024-10-28T11:01:18.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-11-06T09:32:48.000Z (7 months ago)
- Last Synced: 2025-01-06T17:47:34.625Z (4 months ago)
- Topics: aiogram, docker, docker-compose, python, telegram-bot, yandex-disk
- Language: Python
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# *Telegram bot saving files to Yandex Disk*
When sending or forwarding photos & documents in chat with bot, it will save all to [Yandex Disk](https://360.yandex.ru/disk/) in a folder
(by default "bot_uploads", you can choose any other). The bot accepts files from specific users by checking their Telegram ids.
For users whose ids are not specified, the bot will not show any activity.# Environment variables 🦠
| Name | Description |
|:------------:|:------------------------------------------------------------------------------------------------------------------:|
| BOT_TOKEN | Telegram bot API token. You can get it from [@BotFather](https://telegram.me/BotFather) |
| YANDEX_TOKEN | Yandex Disk API token. Get it from this [link](https://yandex.ru/dev/disk-api/doc/ru/concepts/quickstart#oauth) |
| ALLOWED_IDS | This is the telegram id of users from whom the bot will successfully accept photos. Example in `.env.example` file |# How to Use ☄️
## Running in Docker 🐳- configure environment variables in `.env` file
- start services
```commandline
docker compose up -d --build
```
## Running on Local Machine 💻
- install dependencies
```commandline
pip install poetry
```
```commandline
poetry install
```- configure environment variables in `.env` file
- start `main.py` in `app` directoryDon't forget to create a “bot_uploads” folder in the root of the Yandex Disk.
# License ⚖️
Distributed under MIT license. See [LICENSE](https://github.com/nsat1/photo-saving-bot/blob/main/LICENSE) for more information.# Contact 🌍
[email protected]