DEF STUDIO srl

Registering a bot with Telegraph

Any number of bots can be created, both programmatically and through an artisan command

through artisan command

You can add a new bot issuing the dedicated artisan command:

php artisan telegraph:new-bot

you will be guided through a bot creation wizard that will (optionally) allow you to add a new chat and setup a bot webhook as well

programmatically

If you are implementing a custom bot creation logic, you can create a new bot using the TelegraphBot model:

$bot = TelegraphBot::create([
    'token' => $token,
    'name' => $name,
]);
Suggest a change
Last updated 03 October 2024