irazasyed / telegram-bot-sdk

🤖 Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.
https://telegram-bot-sdk.com
BSD 3-Clause "New" or "Revised" License
3.02k stars 669 forks source link

[idea] An extension for Laravel schedule system to send notification through telegram bot #103

Closed alberto-bottarini closed 8 years ago

alberto-bottarini commented 8 years ago

I would like to implement an extension to use Telegram Bot inside my schedule command list (app/Console/Kernel.php) to allow to send notification.

My idea is to have something like this:

$schedule->command('mycommand')->twiceDaily(0, 12)->sendOutputTo('myFile')->telegramOutputTo($chatId);

If you think this is useful, I would like to create a PR when it will be ready.

irazasyed commented 8 years ago

Hi, The idea is good and i appreciate your thought on contribution.

However, I doubt it's something everyone would be using. Since its Laravel specific and this library is not limited to just Laravel users.

But it could very well be turned into a proper separate package as an extension for laravel users, so people can require it if they would want this feature.

Feel free to create a new repo with such feature if you want and we can link it to your repo, In fact that would very well give more ideas to others to work on such extensions and make things more better for all of us. Let me know if you need my help.

alberto-bottarini commented 8 years ago

Hi. Extension is ready. I'm going to do all final tests and then I tell you. You can find this here: https://github.com/alberto-bottarini/laravel-telegram-event-output

I tried to make it all the more easy as possible for developers.

alberto-bottarini commented 8 years ago

I confirm that my extension is working very well. I used in production env for about 1 months and it works in a perfect way.

I will be very grateful if you publish a link to extension on your readme :smile:

irazasyed commented 8 years ago

Done. Added to a new dedicated wiki page here: Telegram Bot SDK Extensions.

Once i tag the stable version of the SDK, I'll probably setup a new page on docs site and list the extension there as well. Thanks.