-
How to save (implement) bot config, |
Beta Was this translation helpful? Give feedback.
Answered by
punyflash
Dec 11, 2023
Replies: 1 comment 5 replies
-
In case you are using Laravel, I think the simplest way will be adding this logic in your public function boot(): void
{
Bot::lazy()->each(fn (Bot $bot) => config(["telebot.bots.{$bot->name}" => $bot->createConfig()]));
} Then when your app is bootstrapped you will be able to use all bots using facade |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can, but use
TelegramNotification
correctly:and create the bot in service provicer first: