Skip to content

feat: add 'doc' command to send files/documents - #2

Merged
jdp5949 merged 1 commit into
mainfrom
feat/send-document
Jun 22, 2026
Merged

jdp5949 merged 1 commit into
mainfrom
feat/send-document

Conversation

@jdp5949

@jdp5949 jdp5949 commented Jun 22, 2026

Copy link
Copy Markdown
Owner

What

Adds file/document sending to the userbot.

  • Client.SendDocument(ctx, target, path, caption) — uploads a local file via gotd uploader and sends it with the message sender. MIME inferred from extension; optional caption.
  • New CLI subcommand: tg-ringer doc TARGET FILE [CAPTION...]
  • Usage/help updated.

Why

Userbot could only send text (msg). Needed to deliver generated PDF reports (ezpass toll summaries) over Telegram, not just email.

Test

  • go build ./... clean; cross-compiled linux/amd64.
  • Deployed to mini1-us, sent a real PDF: tg-ringer doc +<target> report.pdf "caption" → delivered.
  • Existing whoami/session intact after swap.

Add Client.SendDocument (gotd uploader + message sender) and a
'tg-ringer doc TARGET FILE [CAPTION...]' subcommand so the userbot can
deliver files (e.g. PDF reports), not just text. MIME type is inferred
from the file extension; caption is optional.
@jdp5949
jdp5949 merged commit 92c64a9 into main Jun 22, 2026
2 checks passed
@jdp5949
jdp5949 deleted the feat/send-document branch June 22, 2026 13:28
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