nickoala / telepot

Python framework for Telegram Bot API
MIT License
2.42k stars 474 forks source link

execution of the telepot code text formatting how? #399

Open ASNeelima opened 6 years ago

ASNeelima commented 6 years ago

how should i edit the telepot code such that it gives me the bold text (selected) in the output of the bot ? ` print(f'Take as a medicine name: {medicine_name}') try: sent = False for item in get_segregated_by_name(medicine_name):

Drugname: predrine

        # Used in: opthamlmic
        # Form: drops
        # Molecules:xxx...
        #SideEffects:irritationxxx...
        answer = (

            f'drugname: {item.drugname}\n'
            f'Used in : {item.usedin}\n'
            f'Form: {item.form}\n'
            f'Molecules: {item.Molecule}\n'
            f'SideEffects:{item.SideEffects}\n
        )
        bot.sendMessage(chat_id, answer)
        sent = True
    if not sent:
        send_keyboard(chat_id)`

so here i need the text as Drugname: Sideeffects: Form : means the side headings of my out put must be bold text how should i do that? not the whole answere should be bold

codingsett commented 6 years ago

add <b></b> tags the text you want to be bold and make sure the parse mode is html