Translate bot messages

This commit is contained in:
hok7z 2022-12-25 16:17:05 +02:00
parent a9c77d3b24
commit 48a1dcc863
2 changed files with 10 additions and 12 deletions

View File

@ -53,7 +53,7 @@ async def user_report(message: types.Message):
args = message.text.split()
if (len(args) != 2):
await message.reply("Please,enter reason.")
await message.answer("!report (reason)")
return
reported_user = message.reply_to_message.from_user
@ -63,9 +63,9 @@ async def user_report(message: types.Message):
await bot.send_message(
config.second_group_id,
(
"Жалоба на: [{}](tg://user?id={})\n"
"Пожаловался: [{}](tg://user?id={})\n"
"Причина: {}\n"
"Complaint about: [{}](tg://user?id={})\n"
"Complaint from: [{}](tg://user?id={})\n"
"Reason: {}\n"
"{}"
).format(
reported_user.first_name,

View File

@ -7,7 +7,7 @@ async def welcome_message(message:types.Message):
if (user):
await message.answer("Спасибо что вы с нами.")
await message.answer(f"Hi, {user.first_name} again")
if not (user):
Member.create(
@ -16,14 +16,12 @@ async def welcome_message(message:types.Message):
username = message.from_user.username,
)
# TODO: translate it
await message.answer((
f"Привет,{user.first_name}\n"
"Просим ознакомится с [правилами](https://telegra.ph/Pravila-CHata-Open-Source-05-29)\n"
"Советы на 'хороший тон':\n"
"\t\t1.Формулируй свою мысль в 1-2 предложения\n"
"\t\t1.Не задавай [мета](nometa.xyz) вопросы\n"),
parse_mode="Markdown")
f"Hi, **{user.first_name}**!\n"
"Please, read [chat rules]({})"
).format(
"https://nometa.xyz"
),parse_mode="Markdown")
await message.delete()