2016-03-14 14:50:12 +01:00
|
|
|
#!/usr/bin/env python
|
|
|
|
#
|
|
|
|
# A library that provides a Python interface to the Telegram Bot API
|
2021-01-03 06:10:24 +01:00
|
|
|
# Copyright (C) 2015-2021
|
2016-03-14 14:50:12 +01:00
|
|
|
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
|
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Lesser Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Lesser Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser Public License
|
|
|
|
# along with this program. If not, see [http://www.gnu.org/licenses/].
|
2021-06-06 10:37:53 +02:00
|
|
|
# pylint: disable=C0413
|
2016-03-14 14:50:12 +01:00
|
|
|
"""Extensions over the Telegram Bot API to facilitate bot making"""
|
|
|
|
|
2018-09-20 22:50:40 +02:00
|
|
|
from .basepersistence import BasePersistence
|
|
|
|
from .picklepersistence import PicklePersistence
|
|
|
|
from .dictpersistence import DictPersistence
|
2018-09-21 08:57:01 +02:00
|
|
|
from .handler import Handler
|
|
|
|
from .callbackcontext import CallbackContext
|
2021-06-06 10:37:53 +02:00
|
|
|
from .contexttypes import ContextTypes
|
2017-08-12 17:57:12 +02:00
|
|
|
from .dispatcher import Dispatcher, DispatcherHandlerStop, run_async
|
2021-06-06 10:37:53 +02:00
|
|
|
|
|
|
|
# https://bugs.python.org/issue41451, fixed on 3.7+, doesn't actually remove slots
|
|
|
|
# try-except is just here in case the __init__ is called twice (like in the tests)
|
|
|
|
# this block is also the reason for the pylint-ignore at the top of the file
|
|
|
|
try:
|
|
|
|
del Dispatcher.__slots__ # type: ignore[has-type]
|
|
|
|
except AttributeError as exc:
|
|
|
|
if str(exc) == '__slots__':
|
|
|
|
pass
|
|
|
|
else:
|
|
|
|
raise exc
|
|
|
|
|
2016-05-25 22:51:13 +02:00
|
|
|
from .jobqueue import JobQueue, Job
|
2016-03-14 14:50:12 +01:00
|
|
|
from .updater import Updater
|
2016-04-16 16:54:07 +02:00
|
|
|
from .callbackqueryhandler import CallbackQueryHandler
|
|
|
|
from .choseninlineresulthandler import ChosenInlineResultHandler
|
|
|
|
from .inlinequeryhandler import InlineQueryHandler
|
2020-07-28 09:10:32 +02:00
|
|
|
from .filters import BaseFilter, MessageFilter, UpdateFilter, Filters
|
2019-02-13 12:07:25 +01:00
|
|
|
from .messagehandler import MessageHandler
|
|
|
|
from .commandhandler import CommandHandler, PrefixHandler
|
2016-04-14 23:57:40 +02:00
|
|
|
from .regexhandler import RegexHandler
|
2016-04-16 16:54:07 +02:00
|
|
|
from .stringcommandhandler import StringCommandHandler
|
|
|
|
from .stringregexhandler import StringRegexHandler
|
|
|
|
from .typehandler import TypeHandler
|
2016-07-15 01:30:54 +02:00
|
|
|
from .conversationhandler import ConversationHandler
|
2017-05-22 13:20:26 +02:00
|
|
|
from .precheckoutqueryhandler import PreCheckoutQueryHandler
|
|
|
|
from .shippingqueryhandler import ShippingQueryHandler
|
2017-07-23 22:33:08 +02:00
|
|
|
from .messagequeue import MessageQueue
|
|
|
|
from .messagequeue import DelayQueue
|
2020-03-29 09:52:30 +02:00
|
|
|
from .pollanswerhandler import PollAnswerHandler
|
|
|
|
from .pollhandler import PollHandler
|
2021-03-14 16:41:35 +01:00
|
|
|
from .chatmemberhandler import ChatMemberHandler
|
2020-02-06 11:22:56 +01:00
|
|
|
from .defaults import Defaults
|
2016-03-14 14:50:12 +01:00
|
|
|
|
2020-10-09 17:22:07 +02:00
|
|
|
__all__ = (
|
2021-06-06 10:37:53 +02:00
|
|
|
'BaseFilter',
|
|
|
|
'BasePersistence',
|
|
|
|
'CallbackContext',
|
2020-10-09 17:22:07 +02:00
|
|
|
'CallbackQueryHandler',
|
2021-06-06 10:37:53 +02:00
|
|
|
'ChatMemberHandler',
|
2020-10-09 17:22:07 +02:00
|
|
|
'ChosenInlineResultHandler',
|
|
|
|
'CommandHandler',
|
2021-06-06 10:37:53 +02:00
|
|
|
'ContextTypes',
|
|
|
|
'ConversationHandler',
|
|
|
|
'Defaults',
|
|
|
|
'DelayQueue',
|
|
|
|
'DictPersistence',
|
|
|
|
'Dispatcher',
|
|
|
|
'DispatcherHandlerStop',
|
|
|
|
'Filters',
|
2020-10-09 17:22:07 +02:00
|
|
|
'Handler',
|
|
|
|
'InlineQueryHandler',
|
2021-06-06 10:37:53 +02:00
|
|
|
'Job',
|
|
|
|
'JobQueue',
|
2020-10-09 17:22:07 +02:00
|
|
|
'MessageFilter',
|
2021-06-06 10:37:53 +02:00
|
|
|
'MessageHandler',
|
|
|
|
'MessageQueue',
|
|
|
|
'PicklePersistence',
|
|
|
|
'PollAnswerHandler',
|
|
|
|
'PollHandler',
|
|
|
|
'PreCheckoutQueryHandler',
|
|
|
|
'PrefixHandler',
|
2020-10-09 17:22:07 +02:00
|
|
|
'RegexHandler',
|
2021-06-06 10:37:53 +02:00
|
|
|
'ShippingQueryHandler',
|
2020-10-09 17:22:07 +02:00
|
|
|
'StringCommandHandler',
|
|
|
|
'StringRegexHandler',
|
|
|
|
'TypeHandler',
|
2021-06-06 10:37:53 +02:00
|
|
|
'UpdateFilter',
|
|
|
|
'Updater',
|
2020-10-09 17:22:07 +02:00
|
|
|
'run_async',
|
|
|
|
)
|