Skip to content

Instantly share code, notes, and snippets.

@gsam1
Created September 10, 2022 11:41
Show Gist options
  • Save gsam1/793fee98970b25cb29325c05cd28a99c to your computer and use it in GitHub Desktop.
Save gsam1/793fee98970b25cb29325c05cd28a99c to your computer and use it in GitHub Desktop.
import telebot
import schedule
TOKEN = "<YOUR-TOKEN-HERE>"
CHANNEL = "<YOUR-CHANNEL-ID-HERE>"
tb = telebot.TeleBot(TOKEN, parse_mode=None)
def run_screener() -> str:
'''
This is where you would develop your screener.
It is important to note - you should return a string.
'''
return "I generated a new signal!"
def send_telegram_signals() -> None:
msg = run_screener()
tb.send_message(CHANNEL, msg)
if __name__ == '__main__':
schedule.every().hour.at("00").do(send_telegram_signals)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment