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

View File

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