jammerware / margiebot

MargieBot is a .NET library designed to make building bots for Slack fast, easy, and fun.
MIT License
122 stars 42 forks source link

Access to user information. #11

Open rolfwessels opened 8 years ago

rolfwessels commented 8 years ago

Hi,

I have been storing the userId in a database. I now want to send them a private message at random intervals. I was wondering if it would be possible to get user details directly from the Bot?

I looked at the source and I see that there is a private property on the bot. (I now use this property with reflection to get the user's name .. this is obviously just a work around). Is there any better way to get users information when you have either their id or name? Maybe even get their email address?

Thanks

Rolf

Workshop2 commented 8 years ago

It looks like there is an api you can call for this: https://api.slack.com/methods/users.info