Add ping functionality to telegram bot.

TODO: add lag time to response
feature/ping
git-sid 2019-02-14 09:49:18 +01:00
parent 02f117a864
commit 428f42abea
1 changed files with 3 additions and 0 deletions

View File

@ -50,6 +50,9 @@ class TelegramBot(Bot):
"Send reports here to share them with other users. "
"Use /start and /stop to get reports or not.")
# TODO: /help message should be set in frontend
elif update.message.text.lower() == "/ping":
tb.send_message(
update.message.sender.id, "pong")
else:
# set report.author to "" to avoid mailbot crash
sender_name = update.message.sender.username