php-slack-bot icon indicating copy to clipboard operation
php-slack-bot copied to clipboard

Bot sending text to a specific channel

Open ardowz opened this issue 7 years ago • 1 comments

I was wondering if the bot is able to send to a channel without any user command. For example the within my application something happens, I want the bot to post some data.

ardowz avatar Sep 30 '16 20:09 ardowz

Hi,

Yes, you can trigger events with webhooks. https://github.com/jclg/php-slack-bot/blob/master/README.md#incoming-webhooks

Enable the bot webserver, then send a HTTP request from you application (using curl for example) to the bot webserver.

jclg avatar Oct 03 '16 10:10 jclg