Skip to content

Commit b9c5602

Browse files
Update slackbot.py
1 parent d159bc7 commit b9c5602

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

0.1 SlackBot/slackbot.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,20 @@ def add_member(user_id, member_id):
124124
# print (f"Successfully added to the channel {channel}")
125125
# elif add['ok'] == False :
126126
# print(f"Already in {channel}")
127+
128+
129+
130+
#3. Handling Slash Commands
131+
#use slash commands
132+
# @app.route('/slash',methods=["GET","POST"])
133+
# def slash():
134+
# #sents all the dictionary key val pair
135+
# if request.method == "POST" :
136+
# data = request.form
137+
# user_id = data.get('user_id')
138+
# channel_id = data.get('channel_id')
139+
# #client.chat_postmessage(channel=channel_id,text="I got the command")
140+
# return Response(),200
141+
# return ("Simple get request")
142+
143+

0 commit comments

Comments
 (0)