1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Add method.

This commit is contained in:
eternnoir 2015-07-30 09:23:15 +08:00
parent 8f13b636ed
commit a82fece950

View File

@ -10,6 +10,7 @@ except ImportError:
import time
import logging
logger = logging.getLogger('Telebot')
import re
from telebot import apihelper, types
@ -323,6 +324,13 @@ class TeleBot:
self.message_subscribers_messages.pop()
self.message_subscribers_callbacks.pop()
def next_step_handler(self, message):
"""
:param message:
"""
pass
def _notify_message_subscribers(self, new_messages):
for message in new_messages:
if not hasattr(message, 'reply_to_message'):
@ -336,6 +344,7 @@ class TeleBot:
del self.message_subscribers_messages[index]
del self.message_subscribers_callbacks[index]
def message_handler(self, commands=None, regexp=None, func=None, content_types=['text']):
"""
Message handler decorator.
@ -379,8 +388,6 @@ class TeleBot:
return decorator
@staticmethod
def _test_message_handler(message_handler, message):
if message.content_type not in message_handler['content_types']:
@ -490,4 +497,3 @@ class AsyncTeleBot(TeleBot):
@async()
def send_chat_action(self, *args, **kwargs):
return TeleBot.send_chat_action(self, *args, **kwargs)