Queer European MD passionate about IT
浏览代码

Format unknown command message text passing self as bot.

Davte 5 年之前
父节点
当前提交
f8cc0c1a22
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      davtelepot/bot.py

+ 4 - 2
davtelepot/bot.py

@@ -347,8 +347,10 @@ class Bot(TelegramBot, ObjectWithDatabase):
         If instance message is not set, class message is returned.
         """
         if self._unknown_command_message:
-            return self._unknown_command_message
-        return self.__class__._unknown_command_message
+            message = self._unknown_command_message
+        else:
+            message = self.__class__._unknown_command_message
+        return message.format(bot=self)
 
     @property
     def callback_data_separator(self):