Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Ability to manage multiple bots in one Laravel project #487

Open
JeRabix opened this issue Feb 19, 2023 · 5 comments
Open

[FEATURE] Ability to manage multiple bots in one Laravel project #487

JeRabix opened this issue Feb 19, 2023 · 5 comments
Assignees
Labels
enhancement New feature or request laravel Related to the Laravel package

Comments

@JeRabix
Copy link

JeRabix commented Feb 19, 2023

Is your feature request related to a problem? Please describe.

Now I'm doing a project where I have to manage 2 (possibly more) Telegram bots at the same time. I just made a copy of your NutgramServiceProvider and created

$adminBot = new Nugram('admin token');

But to experience the full pleasure of using such a bot, I also have to create each of the commands separately for this bot. (RunCommand, RegisterCommandsCommand, HookInfoCommand...)

I would like to be able to manage multiple bots in one project out of the box

Describe the solution you'd like

Сan make a command that will create ServiceProvider, commands, route file, config file for new bot.
Like a "nutgram:make:bot"

Describe alternatives you've considered

No response

Additional context

No response

@sergix44 sergix44 added the enhancement New feature or request label Feb 19, 2023
@Lukasss93 Lukasss93 transferred this issue from nutgram/nutgram May 12, 2023
@Lukasss93 Lukasss93 self-assigned this May 12, 2023
@sergix44 sergix44 transferred this issue from nutgram/laravel Jun 8, 2023
@sergix44 sergix44 added the laravel Related to the Laravel package label Jun 8, 2023
@Pushkraj19
Copy link

Any update on it?

@JeRabix
Copy link
Author

JeRabix commented Oct 5, 2023

I have vacation in next week, mb i can try this)

@flakka2022
Copy link

ping

@DanielSpravtsev
Copy link

DanielSpravtsev commented Nov 3, 2023

You can create multiple endpoints inside (for example) BotController

And handle any number of bot instances and same or different nutgram routes inside of that controller.

And if you need, you could also make it totally dynamic and store bots in database

There is no need to implement it on the package side

@viiy
Copy link

viiy commented Dec 21, 2023

I saw a failed pull request in nutgram/laravel with a multibot implementation.
I think a better idea would be to provide the ability to enable additional bots from dynamic sources.
For example, a bot implements the ability to construct bots; it receives a botfather token from the user and saves it in the database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request laravel Related to the Laravel package
Projects
None yet
Development

No branches or pull requests

8 participants
@viiy @Lukasss93 @sergix44 @Pushkraj19 @DanielSpravtsev @JeRabix @flakka2022 and others