L
L
Lavrenty Fedotov2017-02-09 20:09:41
Python
Lavrenty Fedotov, 2017-02-09 20:09:41

How to send push notifications from Telegram Bot?

824e3fb773bf47a88a7742faec0af586.jpg
Is it possible to send notifications from Telegram bot? For example, this is implemented in the weather bot
. How to do this in python?
Tried like this

import datetime
import time
report = 'test'
time_now = datetime.datetime.now().time()
report_hour = 17
report_minute = 20
while time_now.hour != report_hour and time_now.minute != report_minute:
    time_now = datetime.datetime.now().time()
    time.sleep(0.5)
else:
    print report

But doesn't work.
I read that you can run on the crown. Do you have an example script?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nllm, 2017-02-09
@nllm

Show all the bot code.
Above code has no interaction with telegram api

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question