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

Update __init__.py

This commit is contained in:
_run 2021-10-13 19:02:17 +05:00
parent 98044d6faa
commit b6625baec6

View File

@ -357,7 +357,7 @@ class TeleBot:
""" """
return apihelper.delete_webhook(self.token, drop_pending_updates, timeout) return apihelper.delete_webhook(self.token, drop_pending_updates, timeout)
def get_webhook_info(self, timeout=None): def get_webhook_info(self, timeout: Optional[int]=None):
""" """
Use this method to get current webhook status. Requires no parameters. Use this method to get current webhook status. Requires no parameters.
If the bot is using getUpdates, will return an object with the url field empty. If the bot is using getUpdates, will return an object with the url field empty.
@ -2381,7 +2381,7 @@ class TeleBot:
chat_id = message.chat.id chat_id = message.chat.id
self.register_next_step_handler_by_chat_id(chat_id, callback, *args, **kwargs) self.register_next_step_handler_by_chat_id(chat_id, callback, *args, **kwargs)
def set_state(self, chat_id, state): def set_state(self, chat_id: int, state: Union[int, str]):
""" """
Sets a new state of a user. Sets a new state of a user.
:param chat_id: :param chat_id:
@ -2389,7 +2389,7 @@ class TeleBot:
""" """
self.current_states.add_state(chat_id, state) self.current_states.add_state(chat_id, state)
def delete_state(self, chat_id): def delete_state(self, chat_id: int):
""" """
Delete the current state of a user. Delete the current state of a user.
:param chat_id: :param chat_id:
@ -2397,10 +2397,10 @@ class TeleBot:
""" """
self.current_states.delete_state(chat_id) self.current_states.delete_state(chat_id)
def retrieve_data(self, chat_id): def retrieve_data(self, chat_id: int):
return self.current_states.retrieve_data(chat_id) return self.current_states.retrieve_data(chat_id)
def get_state(self, chat_id): def get_state(self, chat_id: int):
""" """
Get current state of a user. Get current state of a user.
:param chat_id: :param chat_id:
@ -2408,7 +2408,7 @@ class TeleBot:
""" """
return self.current_states.current_state(chat_id) return self.current_states.current_state(chat_id)
def add_data(self, chat_id, **kwargs): def add_data(self, chat_id: int, **kwargs):
""" """
Add data to states. Add data to states.
:param chat_id: :param chat_id: