Skip to main content

Telegram Send

@magistr/telegram-sendv2026.05.13.1· 1d agoMODELS
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 formatting
  • sendPhoto — image by URL, Telegram file_id, or local file path
  • sendDocument — 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.

02Models1
@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.
ArgumentTypeDescription
textstringMessage 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.
ArgumentTypeDescription
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.
ArgumentTypeDescription
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
04Platforms
05Labels