allekssandr commited on
Commit
ed7da4e
·
verified ·
1 Parent(s): 6066e39

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -138,7 +138,7 @@ async def handle_message(update: Update, context: CallbackContext) -> None:
138
  await update.message.reply_text("❌ Произошла ошибка при обработке запроса")
139
 
140
 
141
- def main() -> None:
142
  try:
143
  application = ApplicationBuilder().token(TOKEN).build()
144
  application.add_handler(CommandHandler("start", start))
@@ -156,5 +156,5 @@ async def error(update: Update, context: CallbackContext) -> None:
156
  logger.error(f'Ошибка: {context.error}')
157
 
158
 
159
- if __name__ == '__main__':
160
- main()
 
138
  await update.message.reply_text("❌ Произошла ошибка при обработке запроса")
139
 
140
 
141
+ def app() -> None:
142
  try:
143
  application = ApplicationBuilder().token(TOKEN).build()
144
  application.add_handler(CommandHandler("start", start))
 
156
  logger.error(f'Ошибка: {context.error}')
157
 
158
 
159
+ if __name__ == '__app__':
160
+ app()