mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-12-28 23:38:31 +01:00
Implements Bot.__reduce__ to allow dump into pickle objs #31
This commit is contained in:
parent
6b714bc805
commit
5bfbaff318
1 changed files with 5 additions and 2 deletions
|
@ -304,7 +304,7 @@ class Bot(TelegramObject):
|
||||||
document,
|
document,
|
||||||
reply_to_message_id=None,
|
reply_to_message_id=None,
|
||||||
reply_markup=None):
|
reply_markup=None):
|
||||||
"""Use this method to send Lesser files.
|
"""Use this method to send general files.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
chat_id:
|
chat_id:
|
||||||
|
@ -460,7 +460,7 @@ class Bot(TelegramObject):
|
||||||
- ChatAction.UPLOAD_PHOTO for photos,
|
- ChatAction.UPLOAD_PHOTO for photos,
|
||||||
- ChatAction.UPLOAD_VIDEO or upload_video for videos,
|
- ChatAction.UPLOAD_VIDEO or upload_video for videos,
|
||||||
- ChatAction.UPLOAD_AUDIO or upload_audio for audio files,
|
- ChatAction.UPLOAD_AUDIO or upload_audio for audio files,
|
||||||
- ChatAction.UPLOAD_DOCUMENT for Lesser files,
|
- ChatAction.UPLOAD_DOCUMENT for general files,
|
||||||
- ChatAction.FIND_LOCATION for location data.
|
- ChatAction.FIND_LOCATION for location data.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -663,3 +663,6 @@ class Bot(TelegramObject):
|
||||||
if self.last_name:
|
if self.last_name:
|
||||||
data['last_name'] = self.last_name
|
data['last_name'] = self.last_name
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
def __reduce__(self):
|
||||||
|
return (self.__class__, (self.token,))
|
||||||
|
|
Loading…
Reference in a new issue