Skip to content

About

Some useful scripts for work with telegram accounts with CLI.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

19 Commits

Folders and files

Repository files navigation

Telegram CLI tools

Some useful scripts for work with telegram accounts with CLI. It supports 2-fa authorization.

How to run

  1. Clone repository
  2. Create virtual env python -m venv venv && source venv/bin/activate
  3. Install requirements python -m pip install -r requirements.txt
  4. Configure config.ini get this data here
[Telegram]
API_ID=11111
API_HASH=sdkjaksljdaisojd890qwj8d832jd

Common parameters

Now there are these modules:

--phone %your_phone_number%
--session-name %session_name_file%

Get Dialog Information module

Iterate through your dialog list and print it to stdout. This module has no specific arguments.

Example:

python3 tele_tools.py --phone %your_phone_here% show_dialogs

It prints to stdout chat_id and chat name for all dialogs in the account.

Clean chats module

This module gets chat history and removes messages. (If you are admin - it removes anybody's messages if you aren't admin only your messages)

--older - remove message older than date
--newer - remove messages newer than date
--delta - remove mesages not in delta days from today
--regex - remove message matched to regex
--chat_id - comma-separated chat identificitors
--dry-run - dry run. Just print messages, not delete

Example:

python3 tele_tools.py --phone %your_phone_here% clean --delta 30 --chat_id %your_chat_id_for_cleaning%

Takeout module

This module downloads information from your cloud account. All messages and media files.

--download-channels - download messages from channels 
--chat-id - comma-separated chat identificitors
--text-only - download only text infomation, no media
--max-size - max size of media to download

About

Some useful scripts for work with telegram accounts with CLI.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages