Fix: Botones de traducción - editar mensaje en Telegram y Discord
This commit is contained in:
@@ -27,7 +27,7 @@ class TelegramSender
|
||||
return $this->request('sendMessage', $data);
|
||||
}
|
||||
|
||||
public function editMessageText(int $chatId, int $messageId, string $text, ?array $keyboard = null, ?string $parseMode = 'HTML'): array
|
||||
public function editMessageText(int $chatId, int $messageId, string $text, ?array $keyboard = null, ?string $parseMode = 'HTML', ?string $inlineMessageId = null): array
|
||||
{
|
||||
$data = [
|
||||
'chat_id' => $chatId,
|
||||
@@ -35,6 +35,12 @@ class TelegramSender
|
||||
'text' => $text,
|
||||
];
|
||||
|
||||
if ($inlineMessageId) {
|
||||
unset($data['chat_id']);
|
||||
unset($data['message_id']);
|
||||
$data['inline_message_id'] = $inlineMessageId;
|
||||
}
|
||||
|
||||
if ($parseMode) {
|
||||
$data['parse_mode'] = $parseMode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user