completed telegram subscriber list functionality
This commit is contained in:
parent
86d63fe9a0
commit
a8504971ea
|
@ -13,8 +13,12 @@ class TelegramBot(Bot):
|
||||||
updates = tb.get_updates().wait()
|
updates = tb.get_updates().wait()
|
||||||
reports = []
|
reports = []
|
||||||
for update in updates:
|
for update in updates:
|
||||||
reports.append(Report(update.message.from.username,self,
|
if update.message.text =="/stop":
|
||||||
update.message.text,None,update.message.date))
|
remove_telegram_subscribers(self, update.message.from.id)
|
||||||
|
else:
|
||||||
|
add_telegram_subscribers(self, update.message.from.id)
|
||||||
|
reports.append(Report(update.message.from.username,self,
|
||||||
|
update.message.text,None,update.message.date))
|
||||||
return reports
|
return reports
|
||||||
|
|
||||||
def post(self, user, report):
|
def post(self, user, report):
|
||||||
|
|
Loading…
Reference in a new issue