mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-09 01:15:31 +00:00
Removed the crutch with the user's language
This commit is contained in:
parent
c03b836a8e
commit
93c61e9e0a
4 changed files with 13 additions and 753 deletions
|
|
@ -17,13 +17,14 @@ dp = Dispatcher(bot)
|
|||
|
||||
@dp.message_handler()
|
||||
async def check_language(message):
|
||||
language = message.from_user.language
|
||||
locale = message.from_user.locale
|
||||
|
||||
await message.reply(text(
|
||||
bold('Info about your language:'),
|
||||
text(' 🔸', bold('Code:'), italic(language.code)),
|
||||
text(' 🔸', bold('Type:'), italic(language.type)),
|
||||
text(' 🔸', bold('Title:'), italic(language.title)),
|
||||
text(' 🔸', bold('Code:'), italic(locale.locale)),
|
||||
text(' 🔸', bold('Territory:'), italic(locale.territory or 'Unknown')),
|
||||
text(' 🔸', bold('Language name:'), italic(locale.language_name)),
|
||||
text(' 🔸', bold('English language name:'), italic(locale.english_name)),
|
||||
sep='\n'), parse_mode=ParseMode.MARKDOWN)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue