MasterGroosha-my-id-bot
Описание
Telegram bot to get ID of some chats (including your own ID) - https://t.me/my_id_bot
Языки
- Python64,2%
- Fluent34,3%
- Dockerfile1,5%
3 года назад
4 года назад
3 года назад
3 года назад
3 года назад
3 года назад
3 года назад
4 года назад
3 года назад
README.md
Bot to get users/chats IDs in Telegram
Give it a try: @my_id_bot.
This is a simple bot written with aiogram 3.x framework to show some IDs, like:
- Your user ID (when asked in inline mode or in private chat with any message);
- Group/supergroup ID (when added to that group or with /id command);
- Channel ID (when message forwarded from channel to one-to-one chat with bot);
- Supergroup ID (when message forwarded from anonymous group admin);
- Topic ID for forum supergroups;
- Sticker ID (they can be re-used with any bot);
- Group to supergroup migrate information (both old and new ID).
Requirements:
- Python 3.9 and newer;
- Linux (should work on Windows, but not tested);
- Systemd init system (optional).
- Docker (optional).
Installation:
Just to test (not recommended)
- Clone this repo;
to cloned directory and initialize Python virtual environment (venv);cd- Activate the venv and install all dependencies from
file;requirements.txt - Copy
toenv_example(with the leading dot), open.envand edit the variables;.env - In the activated venv: python -m bot
Systemd
- Perform steps 1-4 from "just to test" option above;
- Copy
tomy-id-bot.example.service(or whatever your prefer), open it and editmy-id-bot.serviceandWorkingDirectorydirectives;ExecStart - Copy (or symlink) that service file to
directory;/etc/systemd/system/ - Enable your service
;sudo systemctl enable my-id-bot --now - Check that service is running:
(can be used without root privileges).systemctcl status my-id-bot
Docker + Docker Compose
- Get
file and rename it asdocker-compose.example.yml;docker-compose.yml - Get
file, rename it asenv_example(with the leading dot), open it and edit the variables;.env - Run the bot:
;docker compose up -d - Check that container is up and running: docker compose ps