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

Merge pull request #9 from pevdh/master

...actually implemented the offset in TeleBot#get_update now...
This commit is contained in:
FrankWang 2015-06-30 09:44:19 +08:00
commit 4c28537199

View File

@ -1,11 +1,12 @@
# -*- coding: utf-8 -*-
import apihelper
import json
import types
import time
import threading
import apihelper
import types
"""
Module : telebot
"""
@ -46,7 +47,7 @@ class TeleBot:
return self.update_id_list[-1] if len(self.update_id_list) > 0 else None
def get_update(self):
result = apihelper.get_updates(self.token)
result = apihelper.get_updates(self.token, offset=self.get_last_update_id())
if result['ok'] is not True:
raise Exception('getMe Error.' + json.dumps(result))
updates = result['result']