Skip to content

How do I strike text? #19

@liben96

Description

@liben96

Hi,
Im writing a code in node js, using the "node-telegram-bot-api" library version"^0.64.0".

Im using the sendPhoto method... to send a photo... and in the caption im trying to do some formatting.
I am able to do bold, but im not able to do strike.

I have tried parse_mode = MarkdownV2, but it breaks.
I have also tried using a single and double ~ character.

let message = "*bold text*\n\n~strike~\n\n~~Striked~~";
const imgStream = request.get(imageUrl).on('error', function(err) { console.log(err); });
bot.sendPhoto(process.env.telegram_group_id, imgStream, { parse_mode: 'Markdown', caption: message,  })
.then(() => {
    console.log('Message sent successfully');
})
.catch((error) => {
    console.error('Error sending message: ', error);
});
}

Any ideas?
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions