Locale usage fixes
This commit is contained in:
@@ -17,7 +17,7 @@ async def cmd_nearby(app: Client, msg: Message):
|
||||
if len(msg.command) < 2:
|
||||
application = col_applications.find_one({"user": msg.from_user})
|
||||
if application is None:
|
||||
await msg.reply_text(locale("nearby_user_empty", "message", locale=holo_user.locale))
|
||||
await msg.reply_text(locale("nearby_user_empty", "message", locale=holo_user))
|
||||
return
|
||||
location = application["application"]["3"]["loc"][0], application["application"]["3"]["loc"][1]
|
||||
else:
|
||||
@@ -25,10 +25,10 @@ async def cmd_nearby(app: Client, msg: Message):
|
||||
location_coordinates = find_location(" ".join(msg.command[2:]))
|
||||
location = location_coordinates["lng"], location_coordinates["lat"]
|
||||
except PlaceNotFoundError:
|
||||
await msg.reply_text(locale("nearby_invalid", "message", locale=holo_user.locale), quote=should_quote(msg))
|
||||
await msg.reply_text(locale("nearby_invalid", "message", locale=holo_user), quote=should_quote(msg))
|
||||
return
|
||||
except Exception as exp:
|
||||
await msg.reply_text(locale("nearby_error", "message", locale=holo_user.locale), quote=should_quote(msg))
|
||||
await msg.reply_text(locale("nearby_error", "message", locale=holo_user), quote=should_quote(msg))
|
||||
return
|
||||
|
||||
output = []
|
||||
|
@@ -11,9 +11,9 @@ from modules.database import col_applications
|
||||
@app.on_message(~ filters.scheduled & (custom_filters.allowed | custom_filters.admin) & filters.command(["sponsorship"], prefixes=["/"]))
|
||||
async def cmd_sponsorship(app: Client, msg: Message):
|
||||
if HoloUser(msg.from_user).application_state()[0] == "fill":
|
||||
await msg.reply_text(locale("finish_application", "message"), quote=should_quote(msg))
|
||||
await msg.reply_text(locale("finish_application", "message", locale=msg.from_user), quote=should_quote(msg))
|
||||
return
|
||||
await msg.reply_text(locale("sponsorship_apply", "message"), reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton(text=str(locale("sponsor_apply", "button")), callback_data=f"sponsor_apply_{msg.from_user.id}")]]), quote=should_quote(msg))
|
||||
await msg.reply_text(locale("sponsorship_apply", "message", locale=msg.from_user), reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton(text=str(locale("sponsor_apply", "button", locale=msg.from_user)), callback_data=f"sponsor_apply_{msg.from_user.id}")]]), quote=should_quote(msg))
|
||||
# else:
|
||||
# await msg.reply_text(locale("sponsorship_application_empty", "message"))
|
||||
# ==============================================================================================================================
|
Reference in New Issue
Block a user