botman / driver-telegram

BotMan Telegram Driver
MIT License
88 stars 75 forks source link

POST'ing Telegram url through botman studio #13

Closed Jeroen-G closed 7 years ago

Jeroen-G commented 7 years ago

I think it would be great if it were possible from within Botman studio to register the webhook for the bot with telegram. If I were to turn this into an artisan command, would this be merged?

mpociot commented 7 years ago

Yes! I thought about this a few times. I think this feature would be great.

Jeroen-G commented 7 years ago

The telegram driver does not have a service provider, which is necessary to register the command. Should this command maybe be in another repo?

mpociot commented 7 years ago

This works a bit like the Laravel 5.5 auto discovery feature. Every driver has a discovery.json file that contains all drivers and commands that should be loaded automatically by BotMan Studio.

This is what we do with the Facebook driver, for example. https://github.com/botman/driver-facebook/blob/master/discovery.json#L13-L19

The StudioServiceProvider then takes care of loading the drivers:

https://github.com/botman/studio-addons/blob/master/src/Providers/StudioServiceProvider.php#L27-L30