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

Add send_contact

This commit is contained in:
eternnoir
2016-04-16 15:07:52 +08:00
parent 22ab50989e
commit 7490f63f25
2 changed files with 22 additions and 2 deletions

View File

@@ -442,6 +442,13 @@ class TeleBot:
disable_notification, reply_to_message_id, reply_markup)
)
def send_contact(self, chat_id, phone_number, first_name, last_name=None, disable_notification=None,
reply_to_message_id=None, reply_markup=None):
return types.Message.de_json(
apihelper.send_contact(self.token, chat_id, phone_number, first_name, last_name, disable_notification,
reply_to_message_id, reply_markup)
)
def send_chat_action(self, chat_id, action):
"""
Use this method when you need to tell the user that something is happening on the bot's side.
@@ -520,7 +527,6 @@ class TeleBot:
"""
return apihelper.answer_callback_query(self.token, callback_query_id, text, show_alert)
def register_for_reply(self, message, callback):
"""
Registers a callback function to be notified when a reply to `message` arrives.
@@ -689,7 +695,6 @@ class TeleBot:
self.callback_query_handlers.append(handler_dict)
@staticmethod
def _test_message_handler(message_handler, message):
for filter, filter_value in six.iteritems(message_handler['filters']):