Commit Graph

79 Commits

Author SHA1 Message Date
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
68bf9f76f6 Fix forward_messages for a single message when using IDs 2019-04-17 08:51:21 +02:00
Lonami Exo
bd6c03e5f9 Rename grouped to as_album in forward_messages
Public comments regarding this change can be found at:
cf3a4bc658
2019-04-13 11:02:54 +02:00
Lonami Exo
73742633bd Smarter grouping behaviour when forwarding messages 2019-04-11 15:18:15 +02:00
Lonami Exo
cf3a4bc658 Expose grouped parameter in forward_messages (default True) 2019-04-11 12:47:14 +02:00
Lonami Exo
41e4d0f788 Let forward_messages work with messages from different chats
Previously it would take the first chat it found and use the IDs
of all messages, even if they belonged to different chats, resulting
in unexpected messages to be forwarded.

Another solution would be to check that all the chats are the same,
but this solves the issue more nicely and makes it more powerful.
2019-04-02 10:46:37 +02:00
Lonami Exo
a9ab3e1211 Update forward_messages to use _get_response_message 2019-04-02 10:44:42 +02:00
Lonami Exo
e71638abf1 Document that now incoming private messages can be revoked 2019-03-25 08:46:44 +01:00
Lonami Exo
0b4d64947b Fix CallbackQuery.edit for messages via inline queries 2019-03-23 19:25:45 +01:00
Lonami Exo
f6c4ab6f41 Workaround #1124 (Telegram ignoring offset_date) 2019-03-18 17:36:06 +01: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
9d5344e90d Fix-up file to media calls from edit (from 3d72c10) 2019-03-12 22:18:57 +01:00
Lonami Exo
8884015dae Clarify some docstrings 2019-03-10 13:29:34 +01:00
Lonami Exo
df534585e9 Actually fix ids= not being a list, bump 1.6.1 2019-02-28 08:31:28 +01:00
Lonami Exo
2681dc09bb Fix iter_messages with ids= not being a list 2019-02-28 08:26:37 +01:00
Lonami Exo
d02d0e2d5e Handle negative limits gracefully in async generators
We rely on >= 0 for setting the batch size to use (which must
be valid), so it makes sense to make negative limits equal 0.

This is similar to how asyncio.sleep(negative) sleeps 0 seconds,
despite the fact that time.sleep(negative) fails.
2019-02-27 13:01:04 +01:00
Lonami Exo
d508e58d49 Remove the "private" _total parameter 2019-02-27 12:59:50 +01:00
Lonami Exo
bf71e49fcc Remove batch_size parameter from iter_messages
It was only useful for testing purposes, and no other methods
exposed this kind of parameter (but they still use it).
2019-02-27 12:57:54 +01:00
Lonami Exo
c73b8eda26 Simplify filling RequestIter's buffer 2019-02-27 11:25:35 +01:00
Lonami Exo
5b8e6531fa Add method to collect RequestIter into TotalList 2019-02-27 10:15:32 +01:00
Lonami Exo
6d6c1917bc Implement iterator over message by IDs 2019-02-27 10:04:12 +01:00
Lonami Exo
60606b9994 Don't make iter_messages a coroutine function 2019-02-27 09:49:14 +01:00
Lonami Exo
35dc46ffb0 Fix searching messages in reverse 2019-02-27 09:48:47 +01:00
Lonami Exo
e3991fadd5 Fix updating offset 2019-02-27 09:37:12 +01:00
Lonami Exo
f765f73fa3 Fix setting batch size 2019-02-27 09:32:33 +01:00
Lonami Exo
e2f44ddbea Make iter_messages use a common message iterator 2019-02-27 09:31:15 +01:00
Lonami Exo
19f38d6733 Implement iter_messages with search 2019-02-26 21:04:46 +01:00
Lonami Exo
36eb1b1009 Create a new RequestIter ABC to deal with iter methods
This should make it easier to maintain these methods, increase
reusability, and get rid of the async_generator dependency.

In the future, people could use this to more easily deal with
raw API themselves.
2019-02-26 20:26:40 +01:00
Lonami Exo
1e4a12d2f7 Clean up iter_messages with reverse=True 2019-02-26 09:42:28 +01:00
Lonami Exo
abd26af0ad Update misleading error message 2019-02-07 10:16:03 +01:00
Lonami Exo
8492300780 Fix search in private chats when from_user was not given 2019-01-31 11:11:20 +01:00
Lonami Exo
5ac88f764d Fix and update links in the documentation 2019-01-12 13:06:14 +01:00
Lonami Exo
fbf7f75b00 Fix send_message with buttons not always returning ReplyMarkup 2019-01-12 12:53:21 +01:00
Tulir Asokan
f271316d7d Make logger fully configurable (#1087) 2019-01-11 15:52:30 +01:00
Lonami Exo
b66c1e6084 Revert "Get rid of now broken cache"
This reverts commit f73ae42a03.
2018-12-25 16:50:11 +01:00
Lonami Exo
a6c3c382b4 Except MessageIdsEmptyError when getting messages by ID
This error may occur even when the IDs are not actually empty.
2018-12-25 12:17:24 +01:00
Lonami Exo
f73ae42a03 Get rid of now broken cache 2018-12-25 11:44:10 +01:00
Lonami Exo
2aa089f29c Prevent KeyError in forward_messages 2018-12-20 20:33:25 +01:00
Lonami Exo
9a6f4d35f2 Fix crash on get_messages(ids=InputMessageReplyTo) 2018-11-29 14:19:56 +01:00
Lonami Exo
09b16f96fc Better behaviour for send_read_acknowledge 2018-11-24 20:53:28 +01:00
Lonami Exo
d6ec883cd9 Ignore iter_messages from_user unless it's a User 2018-11-19 08:55:49 +01:00
Lonami Exo
32c884d543 Revert d392939 and use empty tuple as a sentinel value 2018-10-08 11:33:56 +02:00
Lonami Exo
8c14259728 Update documentation with new sections 2018-10-06 20:20:11 +02:00
josephbiko
3dd8b7c6d1 Support async def in sessions (#1013) 2018-10-05 20:25:49 +02:00
Lonami Exo
d392939018 Create a default module to use as a sentinel value
This looks better in the documentation than utils.Default,
cleans the utils with specific stuff like this, and users
may use it more easily.
2018-10-05 14:20:50 +02:00
Lonami Exo
db8bea3968 Fix getting messages by ID for private chats 2018-09-16 15:45:38 +02:00
Lonami Exo
dda1f0b1dd Stop copying reply when resending Message, fix file replies 2018-08-19 11:49:36 +02:00