M
M
melodze2021-12-21 20:04:59
Python
melodze, 2021-12-21 20:04:59

Await message.answer("Nety") You can only display text in English. What to do?

@dp.message_handler(commands="fresh_news")
async def get_fres_news(message: types.Message):
fresh_news = check_news_update()

if len(fresh_news) >= 1:
for k, v in sorted(fresh_news.items()):
news = f"{hbold(v['article_date_time'])}\n" \
f"{hlink(v['article_title'], v['article_url'])}"
await message.answer(news)
else:
await message.answer("Nety")

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question