Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem to send photo and open mp3 file #1141

Open
kia1349 opened this issue Sep 22, 2024 · 2 comments
Open

problem to send photo and open mp3 file #1141

kia1349 opened this issue Sep 22, 2024 · 2 comments
Labels

Comments

@kia1349
Copy link

kia1349 commented Sep 22, 2024

PHP version

8.1

irazasyed/telegram-bot-sdk version

3.14

Laravel version (if any)

No response

Code To Reproduce the bug

function sendReminder($chatId, $message, $audioFile) {
global $telegram;
$telegram->sendAudio([
'chat_id' => $chatId,
'audio' => new CURLFile($audioFile), // فایل صوتی را به صورت CURLFile ارسال کنید
'caption' => $message,
]);
}

$filePath = realpath('test.png'); // Get the absolute path
// Send the image using CURLFile
$response = $telegram->sendPhoto([
    'chat_id' => $chatId,
    'photo' => new CURLFile($filePath),
    'caption' => 'Here is the image.'
]);

can anyone help me?

Error stacktrace (if any)

No response

@kia1349 kia1349 added the bug label Sep 22, 2024
@archond
Copy link

archond commented Oct 15, 2024

i have a same problem

@SimoR91
Copy link

SimoR91 commented Dec 14, 2024

I had the same problem.
Also tested with:
$response = $telegram->sendPhoto([ 'chat_id' => $chatId, 'photo' => 'https://domain.ext', (stub) 'caption' => 'Here is the image.' ]);

the issue persists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants