Skip to content

Commit

Permalink
Adicionado método getLocation.
Browse files Browse the repository at this point in the history
  • Loading branch information
httd1 committed Mar 31, 2024
1 parent 4ed41a3 commit a17e960
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/TelegramPhp.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,16 @@ public function getUpdateType () :string
return $keys [1];
}

/**
* A point on the map, [see here the parameters](https://core.telegram.org/bots/api#location)
*
* @return array|null
*/
public function getLocation () :?array
{
return $this->content ['message']['location'] ?? [];
}

/**
* For text messages, the actual UTF-8 text of the message.
*
Expand Down

0 comments on commit a17e960

Please sign in to comment.