Commit Graph

357 Commits

Author SHA1 Message Date
Davte
f8cc0c1a22 Format unknown command message text passing self as bot. 2019-07-15 15:30:22 +02:00
Davte
3669680156 User higher level answer_inline_query method 2019-07-15 15:02:38 +02:00
Davte
052410ecf7 Fixed bugs in parser decorator 2019-07-15 15:02:11 +02:00
Davte
4c25c935bb New version 2019-07-15 13:17:54 +02:00
Davte
9f26352728 Button decorator signature changed 2019-07-15 13:08:39 +02:00
Davte
a8a797a176 Bot decorators will pass only supported arguments to decorated functions
Command, parser, button and query decorators will not pass unsupported 
arguments to their decorated functions anymore (legacy compatibility 
with custombot and new feature for bot).
2019-07-15 13:06:02 +02:00
Davte
e412548edf Added Bot() property callback_data_separator and method to set it
It will be used to parse callback data unless a more specific separator 
is passed to @Bot().button decorator. If both are None, data will be a 
string without prefix.
2019-07-15 13:02:44 +02:00
Davte
f689d9b95a get_me method needed for legacy mode 2019-07-14 20:01:07 +02:00
Davte
0ac4553591 Documentation 2019-07-13 18:26:12 +02:00
Davte
fc7da6d1bd telepot-powered functions replaced with new ones
telepot repository was archived in may 2019
2019-07-13 16:44:13 +02:00
Davte
9cc615df69 Keep admin_tools as legacy module, create new administration_tools
`admin_tools` relies on legacy `custombot`, `administration_tools` on 
`bot`
2019-07-13 16:25:00 +02:00
Davte
f1a5d244df Method to set event handler in routing table 2019-07-13 16:21:51 +02:00
Davte
37d2b6f3d8 Set already_sent value, otherwise it may be referenced before assignment 2019-07-12 14:53:35 +02:00
Davte
367b112809 Inline query decorator refactored 2019-07-12 14:40:55 +02:00
Davte
d6b7b3002e Fixed bug concerning wrong identifier in callback queries
If 'from' in update do not consider update['message']
2019-07-12 14:40:35 +02:00
Davte
b19e7734e0 @bot.command and @bot.button parameter names changed 2019-07-12 14:39:17 +02:00
Davte
b03b24fb2d Logical error in Bot().split_message_text method 2019-07-12 14:31:09 +02:00
Davte
7129e20e31 function renamed to handler 2019-07-12 14:23:21 +02:00
Davte
e17b77490b Authorization function must accept user_record as argument 2019-07-12 14:23:00 +02:00
Davte
87a2f629c7 Commands, aliases and callback handlers must be checked in order 2019-07-12 14:22:34 +02:00
Davte
2a900ceea3 Pass user_record in addition to bot and update in routing cascade 2019-07-12 14:21:54 +02:00
Davte
34c2135962 Preliminary and final additional tasks implemented 2019-07-12 14:19:15 +02:00
Davte
c00fce62aa Missing space 2019-07-12 14:16:54 +02:00
Davte
d3d35b46d2 Useless assignments removed 2019-07-12 14:16:47 +02:00
Davte
c46f6fee52 Catch specific Exception 2019-07-12 14:16:38 +02:00
Davte
a2965be066 longest_cooldown_timedelta property defined 2019-07-12 14:16:20 +02:00
Davte
3decb01165 Dummy coroutine 2019-07-12 14:14:34 +02:00
Davte
cff3c30481 Command decorator defined 2019-07-12 12:43:49 +02:00
Davte
8ee798af5e Get inline_query_id from update 2019-07-12 12:42:26 +02:00
Davte
8919fc08a3 Inline query handler refactored 2019-07-12 12:42:26 +02:00
Davte
d692744b5b f-strings instead of string.format 2019-07-12 12:41:27 +02:00
Davte
ec877aa98a async_wrapper is now more general 2019-07-12 08:30:15 +02:00
Davte
e18299fcd6 Unnecessary indentation 2019-07-11 18:31:09 +02:00
Davte
f135279503 Check that session is open before trying to close it 2019-07-11 17:53:28 +02:00
Davte
8ac12707b6 If bot has no messages attribute, set it 2019-07-09 17:11:06 +02:00
Davte
a24d1b3ef5 Method to create views in database added 2019-07-08 15:43:46 +02:00
Davte
dc5cc92867 Project modules must be imported with davtelepot. prefix 2019-07-06 22:48:55 +02:00
Davte
c477f290dd Callback query handler written 2019-07-03 22:29:27 +02:00
Davte
fd815e4c64 Wrapper for editMessageText method written 2019-07-03 22:29:02 +02:00
Davte
12bc2eba44 Chosen inline result handler written 2019-07-03 20:47:26 +02:00
Davte
80ea019d60 Inline query handler written 2019-07-03 19:39:55 +02:00
Davte
4036971302 Avoid second try, as it is useless
If first try fails, why should a second try succeed?
2019-07-03 19:13:53 +02:00
Davte
0610c0ce19 Wrapper for sendPhoto method
Convert file_path to file_id if possible
2019-07-03 18:50:06 +02:00
Davte
589e27bf0e Provide bot with an associated database (SQLite by default) 2019-07-03 18:48:18 +02:00
Davte
b1ac8d3d40 Allow photo replies to text message updates 2019-07-03 17:29:30 +02:00
Davte
967627c4a2 Path property implemented
Useful when dealing with files
2019-07-03 17:26:31 +02:00
Davte
e47dd1d458 Prevent Telegram flood control on all methods with chat_id as parameter 2019-07-02 23:42:37 +02:00
Davte
7582b4cce4 Do not json-dump files 2019-07-02 14:43:58 +02:00
Davte
3e6fc8ba42 Close certificate file after setting webhook 2019-07-02 14:40:06 +02:00
Davte
94d563b276 Do not wrap certificate file 2019-07-02 14:32:11 +02:00