Prevent AttributeError: 'NoneType' object has no attribute 'format'
This commit is contained in:
parent
948ebcd015
commit
f8ec144719
@ -7,7 +7,7 @@ __author__ = "Davide Testa"
|
|||||||
__email__ = "davide@davte.it"
|
__email__ = "davide@davte.it"
|
||||||
__credits__ = ["Marco Origlia", "Nick Lee @Nickoala"]
|
__credits__ = ["Marco Origlia", "Nick Lee @Nickoala"]
|
||||||
__license__ = "GNU General Public License v3.0"
|
__license__ = "GNU General Public License v3.0"
|
||||||
__version__ = "2.1.10"
|
__version__ = "2.1.11"
|
||||||
__maintainer__ = "Davide Testa"
|
__maintainer__ = "Davide Testa"
|
||||||
__contact__ = "t.me/davte"
|
__contact__ = "t.me/davte"
|
||||||
|
|
||||||
|
@ -369,7 +369,9 @@ class Bot(TelegramBot, ObjectWithDatabase):
|
|||||||
message = self._unknown_command_message
|
message = self._unknown_command_message
|
||||||
else:
|
else:
|
||||||
message = self.__class__._unknown_command_message
|
message = self.__class__._unknown_command_message
|
||||||
return message.format(bot=self)
|
if message is not None:
|
||||||
|
message = message.format(bot=self)
|
||||||
|
return message
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def callback_data_separator(self):
|
def callback_data_separator(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user