Jump to content

georgemo

Members
  • Posts

    2
  • Joined

  • Last visited

georgemo's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thank you for the answer What method would you suggest me to host a python telegram bot that is always running?
  2. Hello, I have just tried this script posted on this forum https://www.helionet.org/index/topic/29129-python-script-behavior/?p=132451 But I get an internal error 500: Here is it: http://georgemo.heliohost.org/cgi-bin/loop.py My intention is to run this script in loop to handle bot messages. So I would also like to get module telepot implemened import telepot import time from telepot.loop import MessageLoop def handle(msg): content_type, chat_type, chat_id = telepot.glance(msg) if content_type == 'text': text = msg['text'] print(text) bot.sendMessage(chat_id = chat_id, text = "This message has been sent by heliohost") #----------------MAIN--------------------------- bot = telepot.Bot("441478801:AAFlc7xxxxxxxSSzSEm0") MessageLoop(bot, handle).run_as_thread() print('Listening ...') # Keep the program running. while 1: time.sleep(100)Thank you
×
×
  • Create New...