AstraOS commited on
Commit
cc87a2a
Β·
verified Β·
1 Parent(s): 4e3ddbf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -17,15 +17,16 @@ if not BOT_TOKEN:
17
  application = Application.builder().token(BOT_TOKEN).build()
18
 
19
  # Define the /start command handler
20
- async def start(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
21
  """Sends a welcome message when the user starts the bot."""
22
- await update.message.reply_text("Hello! This bot is running on Hugging Face Spaces πŸš€")
23
 
24
  # Add command handlers
25
  application.add_handler(CommandHandler("start", start))
26
 
27
  # Function to run the polling
28
  def start_polling():
 
29
  application.run_polling()
30
 
31
  # Start a new thread to run polling
 
17
  application = Application.builder().token(BOT_TOKEN).build()
18
 
19
  # Define the /start command handler
20
+ def start(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
21
  """Sends a welcome message when the user starts the bot."""
22
+ update.message.reply_text("Hello! This bot is running in synchronous mode πŸš€")
23
 
24
  # Add command handlers
25
  application.add_handler(CommandHandler("start", start))
26
 
27
  # Function to run the polling
28
  def start_polling():
29
+ # Run the polling in blocking mode
30
  application.run_polling()
31
 
32
  # Start a new thread to run polling