Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 540 Bytes

3.setting-webhook.md

File metadata and controls

24 lines (16 loc) · 540 Bytes
title navigation.title
Setting a webhook for the bot
Setting a webhook

A webhook lets your bot to answer commands issued from telegram chats and buttons inside messages

through an artisan command

php artisan telegraph:set-webhook {bot_id}

the bot_id argument is mandatory if you have created more than one bot

programmatically

A webhook can be created programmatically for a bot by calling its registerWebhook() method

/** @var TelegraphBot $bot */
$bot->registerWebhook()->send();