I want to build a bot in Telegram with Laravel 5.3, but I have some problems...
My site is located on the computer. How can I register some easy commands (/help, /start)? When I'm writing to bot, it doesn't respond to commands :( But I can get the bot data (id, firstname and bot name). This is my ugly TelegramController:
<?php
namespace App\Http\Controllers;
use Telegram\Bot\Laravel\Facades\Telegram;
class TelegramController extends Controller
{
public function index()
{
$response = Telegram::getMe();
dd($response);
}
}
Please, write some examples... I do not understand what is written in the docs. Have a good day and thanks for help!
Github repository: https://github.com/irazasyed/telegram-bot-sdk
You need to generate a self signed certificate and send it as a parameter through setWebHook to Telegram.
Using self-signed certificates
If you're hosting it on your computer!
There are two ways you can handle user commands.
You are specifically looking for a Laravel bot so you can find the unofficial package here
and here is a step by step guide for you to get started. This blog also has a series of telegram bot articles that helps set Webhook, keyboards and callbacks
If you are looking to buy cheap SSL certificates you can go for SSLS and check out FREE SSL