Skip to content

signifex/telegram_sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

telegram_sh (old version, see dev branch instead)

This is deep re-writed version of old script:

  1. more commands, to configurate bot, send messages or/and documents

  2. writed to work in shell, so can take arguments from output of other shell commands

  3. or can be imported as python module

  4. help (-h/--help) for each command and globally and in python help function

How to setup tgsend

  1. git clone

  2. make sure that you have requests lib installed globally, or modify shebang

  3. chmod +x tgsend.py

  4. add link to file in your bin folde

  5. get api-key from BotFather

  6. tgsend create -A api-key

  7. send any message to bot (to create chat)

  8. get chat id using tgsend getid, store it in your environment (contacts file editor will be added, probably soon)

Usage:

tgsend send [-h] [-A <API-key>] (-T <chat id> | -t <chat name>) [-m message [message ...]] [-d file [file ...]] [-a audiofile [audiofile ...]

Or:

from tgsend import message_handler

message_handler(api_key = <API-key>, chat_id = <chat id>, messages = ["message", "message])

Screenshot 2023-03-30 05 05 22

Screenshot 2023-03-30 05 06 28

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages