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 make bot "reply with typing" #48

Closed
abstract-karshit opened this issue Jun 13, 2017 · 5 comments
Closed

How to make bot "reply with typing" #48

abstract-karshit opened this issue Jun 13, 2017 · 5 comments

Comments

@abstract-karshit
Copy link
Contributor

Hi, Like howdy botkit, I wanted to send messages from jbot using reply with typing feature.
I have set message type as "typing" but still the bot directly replies without a typing info before.

@rampatra
Copy link
Owner

Yes, if you reply with type as typing then it should work. It may not be working in some cases where in no time you send back a reply with type message. Are you sure you're not sending a reply with type message instantly after typing?

@abstract-karshit
Copy link
Contributor Author

Thanks for the reply. Yes Its working, when I went through your reply method it was resetting the message type so I have written a custom reply method using reply method as reference and it works like a charm.

@rampatra
Copy link
Owner

@abstract-karshit but the reply() method is final. Did you modify the library to get it working? I think this maybe an issue which needs to be solved. I can set the type to message only if it isn't set by the user or something.

@rampatra
Copy link
Owner

I thought while replying back, the type will be always message which is not. So I think its a minor bug.

@abstract-karshit
Copy link
Contributor Author

abstract-karshit commented Jun 13, 2017

Yes, reply method is final. I re-wrote the method in a my own class BotUtils.
Yes, I think we should set the type only when it isn't set by the user, I didn't modified the source code as I am using it as a maven dependency.
Also, one more thing to point out is when we encode message, the user mention is not working.
<@userid> doesn't works, so I removed encode in my version of the reply method.

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