Skip to content

Commit

Permalink
Add heroku files
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiosangregorio committed Jun 15, 2021
1 parent 1074fd8 commit a55a042
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: python -m telereddit
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-r pyreddit/requirements/requirements.txt
-r telereddit/requirements/requirements.txt
8 changes: 7 additions & 1 deletion telereddit/telereddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,10 @@ def main() -> None:

dispatcher.add_handler(MessageHandler(Filters.all, on_chat_message))
dispatcher.add_handler(CallbackQueryHandler(on_callback_query))
updater.start_polling()
updater.start_webhook(
listen="0.0.0.0", port=5000, url_path=os.getenv("TELEGRAM_TOKEN")
)
updater.bot.setWebhook(
"https://telereddit.herokuapp.com/" + os.getenv("TELEGRAM_TOKEN")
)
updater.idle()

0 comments on commit a55a042

Please sign in to comment.