botman / botman/driver-telegram

Is there way to send files (not images) without extending the driver?

Open
#119 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
94
Forks
74
PR merge metrics
No merged PRs in 30d

Description

Can I send CSV, XLS, PDF, or other files without rewriting the driver to get this feature?

```
$filePath = $this->createRatesCsv($rates);
$fileAttachment = new File($filePath, [
'custom_payload' => false,
]);
$message = OutgoingMessage::create('Rate Data')->withAttachment($fileAttachment);
$this->bot->reply($message);
```
The construction like that doesn't work with both (URL or path) cases.

Someone may have had the proper piece of code not to dance with that thing.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.