Skip to main content

A Command Line Interface for Telegram

Project description

dark-send

Dark-send is a CLI telegram client written in python. It sends messages and files through your personal telegram account using a daemon that maintains a connection in the background, much like the stock telegram desktop app.

Dependencies

pip3 install -r requirements.txt 

Installation

Install directly from PyPi

pip3 install dark-send 

Or

Clone the repository to a local directory

git clone https://github.com/mindhuntr/dark-send 

For system wide installation

python3 setup.py install

For user specific installation

python3 setup.py install --user 

Configuration

dark-send requires a daemon process running in the background. The daemon can be initialized using a parameter

dark-send --daemonize

Once the config file is generated, it is more robust to create a systemd-unit file that automatically executes the daemon once the system is up


[Unit]
Description=Daemon for dark-send
After=network.target

[Service]
Type=simple
User=YOUR_USER
ExecStart=/usr/bin/python3 -m dark_send.daemon
Restart=on-failure
RestartSec=5
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target

Create a file called dark-send.service with the above content and place it in "/etc/systemd/system". Replace "YOUR_USER" with your username and execute the following commands

systemctl daemon-reload 
systemctl enable dark-send.service
systemctl start dark-send.service

Usage

Display help:

dark-send --help 

To send a message:

dark-send Hello!

Demo

To send an image:

dark-send -i /path/to/image 

To send files as album:

dark-send -a -f /path/to/file /path/to/file 

Demo

To send a video directly without selecting from the chats list

dark-send -v /path/to/file -c "Alienists" 

You can also send messages or files to topics within a group

Demo

Note

dark-send now supports bot logins from v1.2.0. It leverages the user client to fetch chats and then the bot account to send messages and files. Users can initialize several bot accounts and use them by names they designate.

dark-send -b FelineBot -f /path/to/file 

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dark_send-1.2.0.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dark_send-1.2.0-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file dark_send-1.2.0.tar.gz.

File metadata

  • Download URL: dark_send-1.2.0.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for dark_send-1.2.0.tar.gz
Algorithm Hash digest
SHA256 98d049af1d1f6df7b92a3e13761a97b2da5f87e37f27d2e1f02b8e10c397a64e
MD5 4f016515089b52e1c6f90cdbe36d6c47
BLAKE2b-256 d1f4e99d66031c3e48fbb015a925550aeadf92432fb9bfc40703bd7cefbf1d7b

See more details on using hashes here.

File details

Details for the file dark_send-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: dark_send-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 22.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for dark_send-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e21e2f8f9af5f2d63a7a784e9b3f083e8cc7a3bc7417a26d57f87a81fe20a0d
MD5 ef56239e1a2625fd90b1004aabb62768
BLAKE2b-256 be2600a7849ec98d260ba8b405cc54ee5b31d63bb26b1c0a0c62abb0229dcd0f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page