Commit Graph

75 Commits

Author SHA1 Message Date
Lonami Exo
4393ec0b83 Support dice autocast and update docs on send_file for dice 2020-05-05 09:28:37 +02:00
Lonami Exo
3ab9986fc7 Slightly better flow in _file_to_media 2020-03-14 12:16:52 +01:00
Lonami Exo
ccfd7a1015 Don't ignore thumb in send_file(input file)
Fixes #1404
2020-03-14 12:12:40 +01:00
Lonami Exo
68438f4621 Don't store refs to files in cache
File cache has been unused since file_reference were introduced,
there's no point saving them to cache if they're never queried.

Fixes #1400.
2020-03-11 10:07:21 +01:00
painor
0e0052888f
Expose key and iv parameter in downloads/uploads (#1397) 2020-03-04 16:12:34 +01:00
Lonami Exo
1ec38aa5b2 Update and clarify some docs
cc #1388, #1396
2020-02-28 11:50:16 +01:00
Lonami Exo
acb8518911 Fix send_message not forwarding some args to send_file 2020-01-22 14:21:09 +01:00
Alexhol
76cc076d61 Fix send_file not considering videos for albums (#1371) 2020-01-17 11:12:20 +01:00
Lonami Exo
a142b7de5e Handle invalid upload of text fd more gracefully 2019-12-27 12:05:27 +01:00
Lonami Exo
bdb74ac235 Support async fd on download/upload (#1334) 2019-12-27 12:04:08 +01:00
Lonami Exo
6817e19923 Fix return value of send_file(album) of the same media 2019-11-10 14:59:01 +01:00
Lonami Exo
5e6ff67d01 Make allow_cache do nothing for now, bump v1.10.5 (#1272) 2019-09-27 15:12:17 +02:00
Lonami Exo
dab237e758 Support sending scheduled messages 2019-09-06 13:45:31 +02:00
painor
61bc8f7fa3 Fix-up #1259 missing import (#1261) 2019-08-25 21:29:17 +02:00
painor
bd7ab23a8f Support async progress_callback in upload_file (#1259) 2019-08-19 21:11:13 +02:00
Lonami Exo
e1905d0d7a Avoid using telethon.sync in the examples 2019-08-13 23:33:39 +02:00
Lonami Exo
969a36c2a8 Update docs for silent parameter
Since it now also works in private chats to "not disturb friends"
(see https://telegram.org/blog/silent-messages-slow-mode).
2019-08-10 09:06:05 +02:00
Lonami Exo
8e36bb4c4d Link Python keywords with Python's documentation 2019-07-06 12:11:00 +02:00
Lonami Exo
b6b4ea669d Remove messy subclassing in the TelegramClient
Since it was easy to cause MRO inconsistencies, and it's
not really needed now that self is type hinted as the client.
2019-06-24 17:48:46 +02:00
Lonami Exo
1a056899d7 Fix caption when using send_file for albums / mixed documents 2019-06-15 16:59:16 +02:00
Lonami Exo
e47f3ec1d6 Clarify some aspects of the documentation 2019-06-01 16:28:20 +02:00
Lonami Exo
7c1c040d50 Update docstrings to have consistent style 2019-05-20 11:57:11 +02:00
Lonami Exo
0a3d6106f0 Completely overhaul the documentation 2019-05-09 12:50:09 +02:00
Lonami Exo
d92d989569 Quote type hints
Otherwise, sphinx completely butchers the documentation.
2019-05-08 17:16:09 +02:00
Lonami Exo
61613ab6ac Create a new page with a summary of the method reference 2019-05-06 11:38:26 +02:00
Lonami Exo
cd4b915522 Add type hints to all public methods in the client 2019-05-03 21:38:41 +02:00
Lonami Exo
9a400748f7 Fix InlineBuilder only working with local files 2019-05-01 16:02:21 +02:00
Lonami Exo
b32d8307ec Fix sending albums not returning the sent messages (#1151) 2019-04-09 16:48:58 +04:00
Lonami Exo
2fb560624d Fix seeking on strings from c0828f5 when uploading files 2019-04-09 09:29:06 +04:00
Lonami Exo
c0828f590f Fix resize if needed not seeking back for image = bytes 2019-04-02 08:59:35 +02:00
Lonami Exo
7c48857d0c Update docs for send_file/timeouts and add new known error 2019-03-18 17:34:48 +01:00
Lonami Exo
8884015dae Clarify some docstrings 2019-03-10 13:29:34 +01:00
Lonami Exo
3d72c10ea5 Reduce calls to utils.is_image 2019-03-06 09:38:17 +01:00
Lonami Exo
758556cd30 Fix upload_file not seeking streams back
This would cause issues in _cache_media since utils.is_image fails
in the second pass (it respects the stream's position, and the user
may rightfully pass a stream that should be read only from one pos).
2019-03-06 09:24:50 +01:00
Lonami Exo
fcfebf75a3 Prevent pillow from closing non-exclusive fps (#1121) 2019-03-06 09:14:06 +01:00
Lonami Exo
5b098a909a Cleanup converting to input media in send album 2019-02-25 18:25:49 +01:00
Lonami Exo
8e36c0002b Fix sending albums with bot file IDs 2019-02-25 18:23:39 +01:00
Lonami Exo
96270bdc18 Fix sending PNGs without alpha channel, edit size typo 2019-02-19 17:48:27 +01:00
Lonami Exo
6db60627e6 Clearer error on send_file(chat, invalid type) 2019-02-19 16:41:51 +01:00
Lonami Exo
41bfb8ae52 Fix photo resizing not working for images with alpha channels 2019-02-14 12:12:17 +01:00
Lonami Exo
559a40c7ea Fix get_input_media for InputFile
It was actually using FileLocation, which had the invalid expected
type for what was being returned. Instead it should have been this
other type.

In addition, more parameters are passed so that the method can have
all the information it needs to correctly cast the type.
2019-02-13 12:33:11 +01:00
Lonami Exo
5c85f830bd Further document automatic photo resizing 2019-02-13 09:58:02 +01:00
Lonami Exo
fd24f7087e Resize photos when sending files if needed 2019-02-13 09:50:00 +01:00
Lonami Exo
bf11bbd8a6 Support sending bytes/stream as photos (improved _get_extension)
Letting _get_extension work for photos even when the only information
available is a stream or a few bytes allows sending arbitrary bytes
as photos, if force_document was not set to True explicitly.
2019-02-12 11:33:06 +01:00
Kirill
747caf1652 Support Path-like values for thumb in _file_to_media (#1095) 2019-01-22 18:52:53 +01:00
Lonami Exo
8f44364c6c Add supports_streaming to send_file and update docs/errors 2019-01-21 19:47:17 +01:00
Lonami Exo
5ac88f764d Fix and update links in the documentation 2019-01-12 13:06:14 +01:00
Tulir Asokan
f271316d7d Make logger fully configurable (#1087) 2019-01-11 15:52:30 +01:00
Lonami Exo
fc46e1ec20 Workaround file references by using empty byte strings for cache
They seem to work for now, so until there is a need to update it,
cache will just rely on empty byte strings for the file_reference.
2018-12-25 17:02:33 +01:00
Lonami Exo
b66c1e6084 Revert "Get rid of now broken cache"
This reverts commit f73ae42a03.
2018-12-25 16:50:11 +01:00