Skip to content

Commit 82cb4a9

Browse files
Update slackbot.py
1 parent b9c5602 commit 82cb4a9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

0.1 SlackBot/slackbot.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,7 @@ def add_member(user_id, member_id):
141141
# return ("Simple get request")
142142

143143

144+
145+
#extracting userid from /slash command payload
146+
#data = ImmutableMultiDict([('token', 'qrxsSTRiBNwmHkpBbg4Y20T6'), ('team_id', 'T03KB9JUJ77'), ('team_domain', 'slackbottest-jc28549'), ('channel_id', 'C03L3VBK03A'), ('channel_name', 'test'), ('user_id', 'U03JZJFT1N3'), ('user_name', 'fahadmohammed299299'), ('command', '/slash'), ('text', '<@U03LT7U5DBP|fahadbiznes>'), ('api_app_id', 'A03KSSHPL65'), ('is_enterprise_install', 'false'), ('response_url', 'https://hooks.slack.com/commands/T03KB9JUJ77/3814495845920/rXxVNnnOFFVPt2ZTXgZksDWw'), ('trigger_id', '3784130504694.3657324970245.070398f317dae4af941ee5066c022027')]).to_dict()
147+
#userid = data['text'].split('|')[0].split('@')[1]

0 commit comments

Comments
 (0)