def mesva_news(bot, update, section):
"""Defining function that prints 5 news from mesva given section"""
news_to_string = ""
for i, item in enumerate(utils.NEWS[section]):
news_to_string += (str(i + 1) + ' - <a href="{link}">{title}</a>\n\n').format(**item)
news_to_string += ('<a href="http://mesva.univaq.it/">'
'Vedi le altre notizie</a> e attiva le notifiche con /newson per '
'restare sempre aggiornato')
bot.sendMessage(update.message.chat_id,
parse_mode='HTML', disable_web_page_preview=True, text=news_to_string,
reply_markup=telegram.ReplyKeyboardRemove())
return ConversationHandler.END
评论列表
文章目录