Support null answer to callback queries

This commit is contained in:
Davte 2019-07-17 00:18:43 +02:00
parent 9c008d5923
commit 4b27b26467
2 changed files with 3 additions and 1 deletions

View File

@ -7,7 +7,7 @@ __author__ = "Davide Testa"
__email__ = "davide@davte.it"
__credits__ = ["Marco Origlia", "Nick Lee @Nickoala"]
__license__ = "GNU General Public License v3.0"
__version__ = "2.0.8"
__version__ = "2.0.9"
__maintainer__ = "Davide Testa"
__contact__ = "t.me/davte"

View File

@ -541,6 +541,8 @@ class Bot(TelegramBot, ObjectWithDatabase):
user_record=user_record
)
break
if type(answer) is None:
answer = ''
if type(answer) is str:
answer = dict(text=answer)
assert type(answer) is dict, "Invalid callback query answer."