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

How to send message from bot without command from user #31

Closed
WojciechKo opened this issue Nov 26, 2015 · 1 comment
Closed

How to send message from bot without command from user #31

WojciechKo opened this issue Nov 26, 2015 · 1 comment

Comments

@WojciechKo
Copy link

I'm making bot that informs you about weather every day at 8am.
How can I send message with ruby code, not as response to user command?

@dblock
Copy link
Collaborator

dblock commented Nov 26, 2015

This framework is primarily about responding in RealTime, for what you want to do just use slack-ruby-client, see https://github.com/dblock/slack-ruby-client#web-client.

client = Slack::Web::Client.new
client.auth_test
client.chat_postMessage(channel: '#general', text: 'Hello World', as_user: true)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants