Eleirbag89 / TelegramBotPHP

A very simple PHP Telegram Bot API for sending messages.
http://eleirbag89.github.io/TelegramBotPHP
MIT License
807 stars 341 forks source link

How i can send MessageEntity ? #189

Closed ghost closed 4 years ago

ghost commented 5 years ago

I wan mark user with username and without username. How i can do it ?

Screenshots: http://prntscr.com/o8r0g4 http://prntscr.com/o8r047

Mohsen322 commented 5 years ago

check this link: https://core.telegram.org/bots/api#formatting-options

here is a sample:

$content = ['chat_id' => $chat_id, 'text' => '[TESTNAME](tg://user?id='.$user_id.')', 'parse_mode' => 'Markdown'];
$telegram->sendMessage($content);

attention to parse_mode parameter, this is necessary

ghost commented 4 years ago

check this link: https://core.telegram.org/bots/api#formatting-options

here is a sample:

$content = ['chat_id' => $chat_id, 'text' => '[TESTNAME](tg://user?id='.$user_id.')', 'parse_mode' => 'Markdown'];
$telegram->sendMessage($content);

attention to parse_mode parameter, this is necessary

Thanks, im already solve my problem