Closed delrio1110 closed 6 years ago
@delrio1110 When PoshBot runs a command, it does so in a separate PowerShell job. I insert a global variable in that session called $global:PoshBotContext
which has a bunch of useful info you can use in your command, including the calling user info. See this issue for more info.
In short, you should be able to reference $global:PoshBotContext.CallingUserInfo.Email
to get the user's email address from inside your command.
I'll work on getting this feature documented so it's clear.
Thank you, that did it!!!1
I created a function to send email but Im not sure how to get the users slack email address who submitted the request. Also how do I submit these as a question and not as issue?