RXTIME commited on
Commit
d7c0603
·
verified ·
1 Parent(s): 5bd2ef9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -17
app.py CHANGED
@@ -1,23 +1,9 @@
1
  import os
2
- import telegram
3
  from telegram.ext import Application, CommandHandler
4
- from flask import Flask
5
  from threading import Thread
6
  import schedule
7
  import time
8
 
9
- # Inicializa o Flask
10
- app = Flask(__name__)
11
-
12
- # Rota básica para manter o Space ativo
13
- @app.route('/')
14
- def home():
15
- return "Hypercycle Bot is running!"
16
-
17
- # Função para rodar o Flask em uma thread separada
18
- def run_flask():
19
- app.run(host='0.0.0.0', port=int(os.environ.get('PORT', 5000)))
20
-
21
  # Função de exemplo para o comando /start
22
  async def start(update, context):
23
  await update.message.reply_text('Hello! I am Hypercycle Bot.')
@@ -51,9 +37,6 @@ def run_scheduler():
51
  time.sleep(1)
52
 
53
  if __name__ == '__main__':
54
- # Inicia o Flask em uma thread
55
- Thread(target=run_flask).start()
56
-
57
  # Inicia o agendador em uma thread
58
  Thread(target=run_scheduler).start()
59
 
 
1
  import os
 
2
  from telegram.ext import Application, CommandHandler
 
3
  from threading import Thread
4
  import schedule
5
  import time
6
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  # Função de exemplo para o comando /start
8
  async def start(update, context):
9
  await update.message.reply_text('Hello! I am Hypercycle Bot.')
 
37
  time.sleep(1)
38
 
39
  if __name__ == '__main__':
 
 
 
40
  # Inicia o agendador em uma thread
41
  Thread(target=run_scheduler).start()
42