In documentation in "Originating Messages" section it is stated that
BotMan also allows you to send messages to your chat users programatically. You could, for example, send out a daily message to your users that get's triggered by your cronjob.
Is it possible to send message to several users at once? (I tried this code it doesn't work)
Botman::say($request->message, Subscriber::pluck('id_in_telegram')->toArray(), TelegramDriver::class);
or I need to send message to each user separately? (this code works)
foreach (Subscriber::pluck('id_in_telegram') as $subscriberId) {
Botman::say($request->message, $subscriberId, TelegramDriver::class);
}
Hey,
you're right - the say method didn't accept an array until now. I just published 2.1.6 which adds support for this.
Hello @mpociot.
How many users can be sent at once?
hey @niksib , this will probably depend on the driver. There is no limit in BotMan itself.
@christophrumpel Thanks.
Most helpful comment
Hey,
you're right - the
saymethod didn't accept an array until now. I just published 2.1.6 which adds support for this.