From 431e8abcc4bf858e4ca945384a2f60702f1b5a4c Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Tue, 21 Feb 2023 13:00:07 -0800 Subject: make bot as a module --- bot/__init__.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 bot/__init__.py (limited to 'bot/__init__.py') diff --git a/bot/__init__.py b/bot/__init__.py new file mode 100644 index 0000000..5e3c341 --- /dev/null +++ b/bot/__init__.py @@ -0,0 +1,13 @@ +from telegram import __version__ as TG_VER + +try: + from telegram import __version_info__ +except ImportError: + __version_info__ = (0, 0, 0, 0, 0) # type: ignore[assignment] + +if __version_info__ < (20, 0, 0, "alpha", 1): + raise RuntimeError( + f"This example is not compatible with your current PTB version {TG_VER}. To view the " + f"{TG_VER} version of this example, " + f"visit https://docs.python-telegram-bot.org/en/v{TG_VER}/examples.html" + ) -- cgit v1.2.3