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

Revert "...actually implemented the offset in TeleBot#get_update now..."

This commit is contained in:
FrankWang 2015-06-30 10:00:19 +08:00
parent 4c28537199
commit 8eda6a4f13

View File

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