1 پاسخ

ارسال پشت هم پاسخ توسط ربات

نمیدونم چرا وقتی کامند location رو وارد میکنم پشت سر هم این پاسخ بر میگردونه نمیدونم کجارو اشتباه انجام دادم.

<?php namespace App\Telegram\Commands;

use Telegram\Bot\Commands\Command;
use Telegram\Bot\Laravel\Facades\Telegram;

class locationCommand extends Command
{
    protected $name = 'location';

    /**
     * {@inheritdoc}
     */
    public function handle($arguments)
    {

        Telegram::sendLocation([
            'chat_id' => request('message.chat.id'),
            'latitude' => 35.778239,
            'longitude' => 51.361093,
        ]);

        Telegram::sendMessage([
            'chat_id' => request('message.chat.id'),
            'text' => 'در صورت وجود مشکل با پشتیبانی تماس بگیرید'
        ]);
        $messageId = $response->getMessageId(); 
    }
}