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

Add TODO to readme.

This commit is contained in:
eternnoir 2015-06-26 21:56:49 +08:00
parent ac11e26790
commit b14cf1ecd4
2 changed files with 19 additions and 4 deletions

View File

@ -43,3 +43,18 @@ tb.polling(3)
while True: while True:
time.sleep(20) time.sleep(20)
``` ```
## TODO
- [x] getMe
- [ ] sendMessage
- [ ] forwardMessage
- [ ] sendPhoto
- [ ] sendAudio
- [ ] sendDocument
- [ ] sendSticker
- [ ] sendVideo
- [ ] sendLocation
- [ ] sendChatAction
- [ ] getUserProfilePhotos
- [x] getUpdates

View File

@ -65,10 +65,10 @@ class Message:
fromUser = User.de_json(json.dumps(obj['from'])) fromUser = User.de_json(json.dumps(obj['from']))
chat = Message.parse_chat(obj['chat']) chat = Message.parse_chat(obj['chat'])
date = obj['date'] date = obj['date']
text = None opts = {}
if 'text' in obj: if 'text' in obj:
text = obj['text'] opts['text'] = obj['text']
return Message(message_id, fromUser, date, chat, text=text) return Message(message_id, fromUser, date, chat, opts)
@classmethod @classmethod
def parse_chat(cls, chat): def parse_chat(cls, chat):
@ -77,7 +77,7 @@ class Message:
else: else:
return User.de_json(json.dumps(chat)) return User.de_json(json.dumps(chat))
def __init__(self, message_id, fromUser, date, chat, **options): def __init__(self, message_id, fromUser, date, chat, options):
self.chat = chat self.chat = chat
self.date = date self.date = date
self.fromUser = fromUser self.fromUser = fromUser