DeMaking commited on
Commit
3d0a57b
·
verified ·
1 Parent(s): f31a98c

Update bot.py

Browse files
Files changed (1) hide show
  1. bot.py +4 -2
bot.py CHANGED
@@ -117,10 +117,10 @@ async def set_webhook():
117
  except Exception as e:
118
  logger.error(f"Failed to set webhook manually. Error: {e}")
119
  print(f"error setting bot webhook. Error: {e}")
 
120
 
 
121
 
122
- set_webhook()
123
-
124
  # -------------------------
125
  # Main function to run the bot using Webhook mode
126
  # -------------------------
@@ -135,6 +135,8 @@ async def main():
135
  # Log: starting the bot in webhook mode.
136
  logger.info("Starting bot in webhook mode...")
137
 
 
 
138
  # Run the application using webhook mode.
139
  # The bot will listen on all interfaces (0.0.0.0) at the specified port (5000 in this example).
140
  # Make sure that the port you choose is allowed by your hosting environment.
 
117
  except Exception as e:
118
  logger.error(f"Failed to set webhook manually. Error: {e}")
119
  print(f"error setting bot webhook. Error: {e}")
120
+
121
 
122
+ await set_webhook()
123
 
 
 
124
  # -------------------------
125
  # Main function to run the bot using Webhook mode
126
  # -------------------------
 
135
  # Log: starting the bot in webhook mode.
136
  logger.info("Starting bot in webhook mode...")
137
 
138
+
139
+
140
  # Run the application using webhook mode.
141
  # The bot will listen on all interfaces (0.0.0.0) at the specified port (5000 in this example).
142
  # Make sure that the port you choose is allowed by your hosting environment.