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.'
]);
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, ]); }
can anyone help me?
Error stacktrace (if any)
No response