bot.py
def show_fonts(update: Update, context: CallbackContext) -> None:
    """
    Show all the fonts added to the 'fonts' folder in the root.

    :param update: represents an incoming update
    :param context: context of the processed message
    :return: None
    """
    FONTS.clear()
    user_id = update.callback_query.message.chat.id
    keyboard = []
    try:
        if count_user_images(user_id) == 1:
            for font in os.listdir("fonts"):
                font = font.split(".")[0]
                keyboard.append(
                    [
                        InlineKeyboardButton(
                            font, callback_data=f"get_selected_font_{font}"
                        )
                    ]
                )
            reply_markup = InlineKeyboardMarkup(keyboard)
            context.bot.send_message(
                chat_id=user_id, text="Выберите шрифт", reply_markup=reply_markup
            )
        elif count_user_images(user_id) > 1:
            send_message(update, context, "Отправьте следующее изображение")
        else:
            send_message(update, context, "Сначала отправьте изображение")
        update.callback_query.edit_message_reply_markup(None)
    except Exception as e:
        logger.exception(e)

    Show all the fonts added to the 'fonts' folder in the root.

    :param update: represents an incoming update
    :param context: context of the processed message
    :return: None
    
Show all the fonts added to the 'fonts' folder in the root.
Show all the fonts added to the ' fonts ' folder in the root .
def show_fonts(update: Update, context: CallbackContext) -> None:
    FONTS.clear()
    user_id = update.callback_query.message.chat.id
    keyboard = []
    try:
        if count_user_images(user_id) == 1:
            for font in os.listdir("fonts"):
                font = font.split(".")[0]
                keyboard.append(
                    [
                        InlineKeyboardButton(
                            font, callback_data=f"get_selected_font_{font}"
                        )
                    ]
                )
            reply_markup = InlineKeyboardMarkup(keyboard)
            context.bot.send_message(
                chat_id=user_id, text="Выберите шрифт", reply_markup=reply_markup
            )
        elif count_user_images(user_id) > 1:
            send_message(update, context, "Отправьте следующее изображение")
        else:
            send_message(update, context, "Сначала отправьте изображение")
        update.callback_query.edit_message_reply_markup(None)
    except Exception as e:
        logger.exception(e)
def show_fonts ( update : Update , context : CallbackContext ) -> None : FONTS . clear ( ) user_id = update . callback_query . message . chat . id keyboard = [ ] try : if count_user_images ( user_id ) == 1 : for font in os . listdir ( "fonts" ) : font = font . split ( "." ) [ 0 ] keyboard . append ( [ InlineKeyboardButton ( font , callback_data = f"get_selected_font_{font}" ) ] ) reply_markup = InlineKeyboardMarkup ( keyboard ) context . bot . send_message ( chat_id = user_id , text = "Выберите шрифт", reply_marku p reply_markup ) elif count_user_images ( user_id ) > 1 : send_message ( update , context , "Отправьте следующее изображение") else : send_message ( update , context , "Сначала отправьте изображение") update . callback_query . edit_message_reply_markup ( None ) except Exception as e : logger . exception ( e )
Show all the fonts added to the 'fonts' folder in the root.
Show all the fonts added to the ' fonts ' folder in the root .
"""
    Show all the fonts added to the 'fonts' folder in the root.

    :param update: represents an incoming update
    :param context: context of the processed message
    :return: None
    """
None
update
Update
represents an incoming update
represents an incoming update
context
CallbackContext
context of the processed message
context of the processed message