added status function

This commit is contained in:
Rripped 2022-03-29 08:31:58 +02:00
parent c489e9ab46
commit 218f70f541

View File

@ -154,6 +154,21 @@ def send_id(message):
bot.reply_to(message, answer)
#function that sends telegram status(running or offline) as message from telegram bot to user
@bot.message_handler(commands=['status'])
def send_status(message):
""" Sends status to user
:type message: message object bot
:param message: message that was reacted to, if no other command handler gets called
:raises: none
:rtype: none
"""
bot.reply_to(message, "bot is running")
@bot.message_handler(commands=['update'])
def send_update(message):
@ -306,9 +321,6 @@ def main_loop():
:rtype: none
"""
bot.infinity_polling()
while 1:
time.sleep(3)
if __name__ == '__main__':
try: