xooniverse / televerse

Your gateway to seamless Telegram Bot Development 💙
https://televerse.xooniverse.com
BSD 3-Clause "New" or "Revised" License
60 stars 10 forks source link

Markdown / html docs #296

Closed zubbyy closed 6 days ago

zubbyy commented 6 days ago

Hey, i was setting up my bot and couldn't see anywhere in the documentation how to use bold text or markdown support in general. i think i've seen an implementation here tho. thanks

HeySreelal commented 6 days ago

Hey, thanks for raising this :)

Actually we support all the formatting specs Telegram allows - this includes Markdown, HTML, and MarkdownV2.

You'll just have to specify the parseMode parameter in the methods you use. Here's an example:

  bot.command("start", (ctx) async {
    await ctx.reply("*Bolded Hello*", parseMode: ParseMode.markdown);
  });

  bot.command("html", (ctx) async {
    await ctx.reply("<b>Bolded Hello with HTML</b>", parseMode: ParseMode.html);
  });

Hope this helps!


By the way, we have a Telegram chat (@TeleverseDart) - I suppose you're likely to get answers much quicker there, just FYI - if you're feeling lucky feel free to jump in :)