diff --git a/classes/holo_user.py b/classes/holo_user.py index 963fc47..0352ecc 100644 --- a/classes/holo_user.py +++ b/classes/holo_user.py @@ -528,7 +528,7 @@ class HoloUser(): return progress["sponsorship"]["label"] = query col_tmp.update_one({"user": {"$eq": self.id}, "type": {"$eq": "sponsorship"}}, {"$set": {"sponsorship": progress["sponsorship"], "complete": True}}) - await msg.reply_text(locale("sponsor_confirm", "message"), reply_markup=ReplyKeyboardMarkup(locale("confirm", "keyboard", locale=self.locale), resize_keyboard=True)) + await msg.reply_text(locale("sponsor_confirm", "message", locale=self.locale), reply_markup=ReplyKeyboardMarkup(locale("confirm", "keyboard", locale=self.locale), resize_keyboard=True)) else: return diff --git a/modules/callbacks/sponsorship.py b/modules/callbacks/sponsorship.py index 16291a7..cc1c0d4 100644 --- a/modules/callbacks/sponsorship.py +++ b/modules/callbacks/sponsorship.py @@ -24,9 +24,9 @@ async def callback_query_sponsor_apply(app: Client, clb: CallbackQuery): edited_markup = [[InlineKeyboardButton(text=str(locale("sponsor_started", "button")), callback_data="nothing")]] - await clb.message.edit(text=locale("sponsorship_applying", "message"), reply_markup=InlineKeyboardMarkup(edited_markup)) - await app.send_message(holo_user.id, locale(f"sponsor1", "message", locale=holo_user.locale), reply_markup=ForceReply(placeholder=str(locale(f"sponsor1", "force_reply", locale=holo_user.locale)))) - await clb.answer(text=locale("sponsor_started", "callback").format(holo_user.id), show_alert=False) + await clb.message.edit(text=locale("sponsorship_applying", "message", locale=holo_user), reply_markup=InlineKeyboardMarkup(edited_markup)) + await app.send_message(holo_user.id, locale(f"sponsor1", "message", locale=holo_user), reply_markup=ForceReply(placeholder=str(locale(f"sponsor1", "force_reply", locale=holo_user.locale)))) + await clb.answer(text=locale("sponsor_started", "callback", locale=holo_user).format(holo_user.id), show_alert=False) @app.on_callback_query(filters.regex("sponsor_yes_[\s\S]*")) async def callback_query_sponsor_yes(app: Client, clb: CallbackQuery): diff --git a/modules/commands/nearby.py b/modules/commands/nearby.py index 4391b0c..d3b38e9 100644 --- a/modules/commands/nearby.py +++ b/modules/commands/nearby.py @@ -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 = [] diff --git a/modules/commands/sponsorship.py b/modules/commands/sponsorship.py index b8a3746..c64fe88 100644 --- a/modules/commands/sponsorship.py +++ b/modules/commands/sponsorship.py @@ -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")) # ============================================================================================================================== \ No newline at end of file