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

Keyboard typing "..." when sending a message #55

Closed
luisbebop opened this issue Mar 12, 2016 · 1 comment
Closed

Keyboard typing "..." when sending a message #55

luisbebop opened this issue Mar 12, 2016 · 1 comment

Comments

@luisbebop
Copy link

I implemented a command that takes few seconds to respond to the user.
How can I simulate the keyboard typing "..." ?

Thanks in advance.

@dblock
Copy link
Collaborator

dblock commented Mar 13, 2016

You can do this with client.typing(channel: '#channel'), it sends something like { type: 'typing', id: 42, channel: 'channel' } to the web socket. See https://github.com/dblock/slack-ruby-client/blob/fcdc4b1c90df51ce14cf85480e0de47f9a2bc1a9/lib/slack/real_time/api/typing.rb#L10. There's an example here.

Note, if you're going to take some time to respond to user messages, you probably want to do the operation async.

@dblock dblock closed this as completed Mar 13, 2016
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