errbot icon indicating copy to clipboard operation
errbot copied to clipboard

Plugin development: advanced features

Open theRealDrumBum opened this issue 13 years ago • 2 comments

Could you expand the plugin development with a couple hints for the following:

How can a plugin cause the bot to directly message a user or send a message to a specific chat as an argument?

How to send a message response in a json payload to the chat api (e.g. I want to decorate the message with additional data not just the message.)

theRealDrumBum avatar Feb 21 '13 21:02 theRealDrumBum

Hi, I am not sure what you want to achieve but for sending a message directly to somebody you can do:

self.send(person_id, "message")

like in the example in the doc https://github.com/gbin/err/wiki/plugin-dev#wiki-async

To be able to receive a webhook notification you need to use the @webhook decorator, there is some doc about how to setup err to it can listen to those message and react on the chat : checkout https://github.com/gbin/err/wiki/Webhooks

If you have more difficulties or the docs could be improved feel free to contact me on gtalk : [email protected]

Good luck with err !

gbin avatar Feb 21 '13 23:02 gbin

Right on, thanks man!

On Thu, Feb 21, 2013 at 3:14 PM, Guillaume BINET [email protected]:

Hi, I am not sure what you want to achieve but for sending a message directly to somebody you can do:

self.send(person_id, "message")

like in the example in the doc https://github.com/gbin/err/wiki/plugin-dev#wiki-async

To be able to receive a webhook notification you need to use the @webhook decorator, there is some doc about how to setup err to it can listen to those message and react on the chat : checkout https://github.com/gbin/err/wiki/Webhooks

If you have more difficulties or the docs could be improved feel free to contact me on gtalk : [email protected]

Good luck with err !

— Reply to this email directly or view it on GitHubhttps://github.com/gbin/err/issues/119#issuecomment-13919254.

theRealDrumBum avatar Feb 21 '13 23:02 theRealDrumBum