diff options
Diffstat (limited to 'bot.py')
-rw-r--r-- | bot.py | 22 |
1 files changed, 4 insertions, 18 deletions
@@ -3,25 +3,11 @@ import logging | |||
3 | import os | 3 | import os |
4 | import traceback | 4 | import traceback |
5 | 5 | ||
6 | from telegram import __version__ as TG_VER | ||
7 | |||
8 | try: | ||
9 | from telegram import __version_info__ | ||
10 | except ImportError: | ||
11 | __version_info__ = (0, 0, 0, 0, 0) # type: ignore[assignment] | ||
12 | |||
13 | if __version_info__ < (20, 0, 0, "alpha", 1): | ||
14 | raise RuntimeError( | ||
15 | f"This example is not compatible with your current PTB version {TG_VER}. To view the " | ||
16 | f"{TG_VER} version of this example, " | ||
17 | f"visit https://docs.python-telegram-bot.org/en/v{TG_VER}/examples.html" | ||
18 | |||
19 | ) | ||
20 | |||
21 | from telegram import ForceReply, Update, File | ||
22 | from telegram.ext import Application, CommandHandler, ContextTypes, MessageHandler, filters | ||
23 | from telegram.constants import ParseMode | ||
24 | from PIL import Image | 6 | from PIL import Image |
7 | from telegram import Update | ||
8 | from telegram.constants import ParseMode | ||
9 | from telegram.ext import Application, CommandHandler, ContextTypes, MessageHandler, filters | ||
10 | |||
25 | from square import square_size_padding | 11 | from square import square_size_padding |
26 | 12 | ||
27 | # Enable logging | 13 | # Enable logging |