Skip to content

Instantly share code, notes, and snippets.

@maxiride
Last active March 13, 2021 07:46
Show Gist options
  • Save maxiride/986e5f07c6dd93f82f506074096c7d49 to your computer and use it in GitHub Desktop.
Save maxiride/986e5f07c6dd93f82f506074096c7d49 to your computer and use it in GitHub Desktop.
Summary with expanding details code for github
For instance `Request::sendMessage($data)` uses:
$data = [
  'chat_id' => $chat_id, 
  'text' => 'Your utf8 text 😜 ...'
];

Note that messages longer than 4096 characters are split up into multiple messages.

For instance Request::sendPhoto($data) uses:

$data = [
    'chat_id' => $chat_id,
    'photo'   => Request::encodeFile('/path/to/pic.jpg'),
];

Alternatively 'photo' => 'https://example.com/path/to/pic.jpg' for sending online images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment