mjwsteenbergen / ApiLibs

An easily extendable restclient library for csharp
https://www.nuget.org/packages/ApiLibs/
4 stars 1 forks source link

Telegram sendmessage example? #10

Closed ItItaca closed 4 years ago

ItItaca commented 4 years ago

Hello, for a start, thanks for your work on this utility. Google led me here since your telegram call seems to support the 'parse_mode' property that allows sending html formatted messages, but usage is not clear.

Could you add a telegram send message example?

Thanks

mjwsteenbergen commented 4 years ago

Hi!

Thank you for your interest! Although I would love it if people used my package, there are other way better implementations of the Telegram API out there. They cover the entire API and have the documentation I never had time to write that I would use if I was starting from scratch.

One I found was https://github.com/TelegramBots/telegram.bot which also supports the parsemode you want and the new markdown_v2 https://telegrambots.github.io/book/2/send-msg/text-msg.html

If you do want to use my package:

TelegramService tgs = new TelegramService(Telegram_token, null);
await tgs.SendMessage(AdminId, "Your text", ParseMode.Markdown);

Hope this helps!

ItItaca commented 4 years ago

Thank you!