diff options
Diffstat (limited to 'bot.py')
-rw-r--r-- | bot.py | 40 |
1 files changed, 34 insertions, 6 deletions
@@ -1,12 +1,40 @@ | |||
1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
2 | 2 | ||
3 | from telegram.ext import Application, CallbackQueryHandler, CommandHandler, MessageHandler, filters, ConversationHandler | ||
4 | import logging | 3 | import logging |
5 | from callback import callback_skip_media, callback_location_sharing, callback_manual_location, \ | 4 | |
6 | callback_location_confirmation, callback_location_keyword_search, callback_skip_location_keyword, \ | 5 | from telegram.ext import ( |
7 | callback_add_comment, callback_skip_comment, callback_add_media | 6 | Application, |
8 | from config import WAIT_LOCATION, LOCATION_SEARCH_KEYWORD, LOCATION_CONFIRMATION, ADD_MEDIA, ADD_COMMENT, BOT_TOKEN | 7 | CallbackQueryHandler, |
9 | from command import start_command, cancel_command, help_command | 8 | CommandHandler, |
9 | MessageHandler, | ||
10 | filters, | ||
11 | ConversationHandler | ||
12 | ) | ||
13 | |||
14 | from callback import ( | ||
15 | callback_skip_media, | ||
16 | callback_location_sharing, | ||
17 | callback_manual_location, | ||
18 | callback_location_confirmation, | ||
19 | callback_location_keyword_search, | ||
20 | callback_skip_location_keyword, | ||
21 | callback_add_comment, | ||
22 | callback_skip_comment, | ||
23 | callback_add_media | ||
24 | ) | ||
25 | from command import ( | ||
26 | start_command, | ||
27 | cancel_command, | ||
28 | help_command | ||
29 | ) | ||
30 | from config import ( | ||
31 | WAIT_LOCATION, | ||
32 | LOCATION_SEARCH_KEYWORD, | ||
33 | LOCATION_CONFIRMATION, | ||
34 | ADD_MEDIA, | ||
35 | ADD_COMMENT, | ||
36 | BOT_TOKEN | ||
37 | ) | ||
10 | 38 | ||
11 | logging.basicConfig( | 39 | logging.basicConfig( |
12 | format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level=logging.INFO | 40 | format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level=logging.INFO |