Skip to content

Instantly share code, notes, and snippets.

@luizmarcus
Created March 17, 2021 20:39
Show Gist options
  • Save luizmarcus/63e9db22e0668c558b4144daacbbc5a7 to your computer and use it in GitHub Desktop.
Save luizmarcus/63e9db22e0668c558b4144daacbbc5a7 to your computer and use it in GitHub Desktop.
<?php
if (isset($message['photo'])) { //checa se existe uma imagem na mensagem
$photo = $message['photo'][count($message['photo'])-1]; //obtém a imagem no tamanho original
//envia a imagem recebida com a legenda
sendMessage("sendPhoto", array('chat_id' => $chat_id, "photo" => $photo["file_id"], "caption" => "A legenda da foto foi: ".$$message["caption"]));
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment