Linux command
tgsend 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Send message
tgsend "[message]"
Send to specific chat
tgsend -c [chat_id] "[message]"
Send file
tgsend -f [document.pdf]
Send image
tgsend -p [image.jpg]
Send with caption
tgsend -p [image.jpg] -m "[caption]"
Silent message
tgsend -s "[message]"
说明
tgsend sends messages, files, and photos to Telegram chats using the Telegram Bot API. It is designed for automation and scripting, enabling notifications, alerts, and file delivery from the command line or cron jobs. Messages can be sent to specific chats using their ID, and media attachments can include captions via the -m flag. The -s flag sends messages silently without triggering a notification on the recipient's device. A bot token is required and can be passed via the -t flag or environment configuration.
参数
- -c _ID_
- Chat ID.
- -f _FILE_
- Send file.
- -p _FILE_
- Send photo.
- -m _TEXT_
- Caption text.
- -s
- Silent mode.
- -t _TOKEN_
- Bot token.
FAQ
What is the tgsend command used for?
tgsend sends messages, files, and photos to Telegram chats using the Telegram Bot API. It is designed for automation and scripting, enabling notifications, alerts, and file delivery from the command line or cron jobs. Messages can be sent to specific chats using their ID, and media attachments can include captions via the -m flag. The -s flag sends messages silently without triggering a notification on the recipient's device. A bot token is required and can be passed via the -t flag or environment configuration.
How do I run a basic tgsend example?
Run `tgsend "[message]"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -c _ID_ do in tgsend?
Chat ID.