Skip to content

feat(telegram): implement sendFile for photo and document delivery#148

Open
shakhruz wants to merge 1 commit into
nanocoai:mainfrom
shakhruz:feat/telegram-send-file
Open

feat(telegram): implement sendFile for photo and document delivery#148
shakhruz wants to merge 1 commit into
nanocoai:mainfrom
shakhruz:feat/telegram-send-file

Conversation

@shakhruz
Copy link
Copy Markdown

Summary

  • Add sendFile() method to TelegramChannel for sending files to chat
  • Photos (.jpg, .jpeg, .png, .webp) sent via sendPhoto for inline display
  • Other file types sent via sendDocument as attachments
  • Optional Markdown caption support
  • Imports InputFile from grammy for local file uploads

Dependencies

Test plan

  • Build passes
  • Photos delivered as inline images in Telegram
  • Documents delivered as file attachments
  • Caption with Markdown formatting works
  • Missing/invalid file path logged as error without crash

🤖 Generated with Claude Code

Add sendFile() method to TelegramChannel that sends files to chat using
the Telegram Bot API. Photos (.jpg, .jpeg, .png, .webp) are sent via
sendPhoto for inline display; other file types via sendDocument.

Supports optional Markdown caption (max 1024 chars per Telegram limits).
Imports InputFile from grammy for file uploads from local paths.

Works with the send_file MCP tool (nanocoai/nanoclaw#1757) — the IPC
handler translates container paths to host paths, then calls this method.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant