Telegram Send
@magistr/telegram-sendv2026.05.13.1
01README
Send messages, photos, and documents to Telegram chats and channels via the Telegram Bot API.
Methods:
getMe— verify the bot token and fetch bot identity (smoke test)sendMessage— text with optional MarkdownV2 / HTML formattingsendPhoto— image by URL, Telegramfile_id, or local file pathsendDocument— arbitrary file (PDF, ZIP, …) up to 50 MB
The botToken is stored as a sensitive globalArgument and routed to a
vault automatically. Set defaultChatId on the model instance to avoid
repeating the chat target on every call.
A natural complement to @magistr/telegram-import, which goes the other
direction — importing Telegram channel exports into Obsidian.
02Models
@magistr/telegram/sendv2026.05.13.1telegram_send.ts
fn getMe()
Call getMe to verify the bot token and fetch bot identity. Use as a smoke-test.
fn sendMessage(text: string, disableWebPagePreview?: boolean, disableNotification?: boolean, replyToMessageId?: number)
Send a text message to a chat or channel.
| Argument | Type | Description |
|---|---|---|
| text | string | Message text (1-4096 characters) |
| disableWebPagePreview? | boolean | |
| disableNotification? | boolean | |
| replyToMessageId? | number |
fn sendPhoto(chatId?: string, caption?: string, disableNotification?: boolean)
Send a photo. `photo` may be an https URL, a Telegram file_id, or a local file path.
| Argument | Type | Description |
|---|---|---|
| chatId? | string | |
| caption? | string | |
| disableNotification? | boolean |
fn sendDocument(chatId?: string, caption?: string, disableNotification?: boolean)
Send a document/file. `document` may be an https URL, a Telegram file_id, or a local file path.
| Argument | Type | Description |
|---|---|---|
| chatId? | string | |
| caption? | string | |
| disableNotification? | boolean |
Resources
botInfo(infinite)— Bot identity returned by getMe
sentMessage(infinite)— Result of a send* call
03Stats
A
100 / 100
Downloads
0
Archive size
7.3 KB
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types1/1earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned
Repository
https://github.com/umag/swamp-workspace04Platforms
05Labels