【发布时间】:2018-09-02 18:31:46
【问题描述】:
我正在尝试发送带有电话号码作为链接的消息。有没有办法做到这一点?我正在使用Laravel Telegram Bot API
public function start( $telegram, $chatid ) {
$keyboard = [
['Continue'],
];
$reply_markup = Telegram::replyKeyboardMarkup([
'keyboard' => $keyboard,
'resize_keyboard' => true,
'one_time_keyboard' => true
]);
$text = "<b>¡Hola!</b> " . config('constants.emojis.waving-hand') .
" Hey I'm Bot. " . config('constants.emojis.hug-face') .
"\nPlease chose some option" .
config('constants.emojis.glass') . "\nOr contact us at <a href='tel:018099999999'>HEREÍ</a> to talk with an specialist.";
$this->sendMessage( $telegram, $chatid, $text, $reply_markup );
}
这也是我的发送消息功能
public function sendMessage( $telegram, $chatid, $text, $reply_markup ) {
if ( !is_null( $reply_markup ) ) {
$response = $telegram->sendMessage([
'chat_id' => $chatid,
'text' => $text,
'parse_mode' => 'HTML',
'reply_markup' => $reply_markup
]);
} else {
$response = $telegram->sendMessage([
'chat_id' => $chatid,
'text' => $text,
'parse_mode' => 'HTML',
]);
}
}
提前致谢。
【问题讨论】: