Add files via upload

This commit is contained in:
Víctor Martínez Montané 2019-10-15 12:07:27 +02:00 committed by GitHub
parent d33bdd6d0d
commit d428cdf140
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 3 deletions

15
app.py
View file

@ -2,10 +2,12 @@ import telebot
import time
import pafy
import os
from flask import Flask
bot_token = os.getenv('BOT_TOKEN')
bot_token = '837420348:AAEY2WT04zBjpCHYvOzCdy4FHhZf8jX6udE'
bot = telebot.TeleBot(token=bot_token)
server = Flask(__name__)
@bot.message_handler(commands=['start'])
def send_welcome(message):
@ -35,8 +37,15 @@ def download_song(message):
return filename
@server.route("/")
def webhook():
bot.remove_webhook()
bot.set_webhook(url='https://cryptic-crag-46329.herokuapp.com/' + bot_token)
return "!", 200
while True:
try:
bot.polling()
except Exception:
time.sleep(15)
time.sleep(15)

View file

@ -42,6 +42,7 @@ prettytable==0.7.2
proglog==0.1.9
protobuf==3.6.1
pycairo==1.16.2
pycrypto==2.6.1
pycups==1.9.73
pydbus==0.6.0
PyGObject==3.32.0
@ -53,6 +54,8 @@ python-apt==1.8.4
python-telegram-bot==12.1.1
python-xlib==0.23
pytz==2018.9
pyxdg==0.25
PyYAML==3.13
Repoman==1.0.2
requests==2.21.0
requests-unixsocket==0.1.5
@ -70,6 +73,7 @@ tqdm==4.36.1
ubuntu-advantage-tools==19.2
ubuntu-drivers-common==0.0.0
ufw==0.36
urllib3==1.24.1
Werkzeug==0.16.0
xkit==0.0.0
youtube-dl==2019.9.28

1
runtime.txt Normal file
View file

@ -0,0 +1 @@
python-3.7.3