Skip to content

Commit

Permalink
Fix translation
Browse files Browse the repository at this point in the history
  • Loading branch information
b00bl1k committed Jan 14, 2024
1 parent 0eb87d8 commit 537d006
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion avbot/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,8 @@ def on_preprocess_update(update: Update, context: CallbackContext):


def register_commands(dp):
dp.add_handler(MessageHandler(Filters.update, on_preprocess_update))
dp.add_handler(MessageHandler(Filters.update, on_preprocess_update), 0)
dp.add_handler(CallbackQueryHandler(on_preprocess_update), 0)
dp.add_handler(CommandHandler("start", on_start_command), 1)
dp.add_handler(CommandHandler("help", on_help_command), 1)
dp.add_handler(CommandHandler("setlang", on_setlang_command), 1)
Expand Down
3 changes: 2 additions & 1 deletion avbot/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ def get_or_create_user(telegram_id, first_name, last_name, username,


def get_user(telegram_id):
return session.query(models.Usaer).get(telegram_id)
return session.query(models.User)\
.filter_by(telegram_id=telegram_id).first()


def add_search_query(user, query_text, num_type="ru"):
Expand Down

0 comments on commit 537d006

Please sign in to comment.