Closed mritd closed 6 years ago
you need specify caption https://core.telegram.org/bots/api#senddocument
FileName is not "" when you got file
@Oleg-MBO I added the caption parameter, but the file name has not changed.
Hmm, it seems that 6264ba6 doesn't work for the OP case either. Reproduced the same issue with tb.FromDisk
too. Ping @tucnak @stek29.
We should probably add filename parameter to addFileToWriter
function.
hm, I don't think that'd be enough. FileName needs to be passed from (Object).Send
to (*Bot) sendObject
, and from there to (*Bot) sendFiles
, and from there to addFileToWriter
.
Also, what should we do with files created from file_id/url? There's no way to set filename there, is there?
FileName not work when use Send tb.Document; Here is the sample code: