errbotio / errbot

Errbot is a chatbot, a daemon that connects to your favorite chat service and bring your tools and some fun into the conversation.
http://errbot.io
GNU General Public License v3.0
3.12k stars 614 forks source link

[Plugins] Get data about slack user, who trigger bot #1508

Closed ingtarius closed 3 years ago

ingtarius commented 3 years ago

In order to let us help you better, please fill out the following fields as best you can:

I am...

I am running...

Issue description

I try to write simple python plugin for errbot to collect data about user from internal sources (ldap etc) Simple flow: user write to slack-bot command !myinfo -> plugin connect to resources and get data about user, parse it, return to user It is secure to protect other users info from this queue (for example, i need to collect data only about myself), so i need to get information about user, who trigger bot. I see this information in errbot.backends.slack Processing slack event user field in debug log, how i can get this data in plugin?

nzlosh commented 3 years ago

I think you're looking for the command !whoami. It will report the Slack attributes of the user that triggered the command.

ingtarius commented 3 years ago

Wow! You are right I need this info in custom plugin, so i can access in via "msg.frm.fullname" for example. Thanks for help