@@ -81,14 +81,14 @@ def handle_regular_answer(
81
81
messages = message_info .thread_messages
82
82
83
83
message_ts_to_respond_to = message_info .msg_to_respond
84
- is_bot_msg = message_info .is_bot_msg
84
+ is_slash_command = message_info .is_slash_command
85
85
86
86
# Capture whether response mode for channel is ephemeral. Even if the channel is set
87
87
# to respond with an ephemeral message, we still send as non-ephemeral if
88
88
# the message is a dm with the Onyx bot.
89
89
send_as_ephemeral = (
90
90
slack_channel_config .channel_config .get ("is_ephemeral" , False )
91
- or message_info .is_bot_msg
91
+ or message_info .is_slash_command
92
92
) and not message_info .is_bot_dm
93
93
94
94
# If the channel mis configured to respond with an ephemeral message,
@@ -164,7 +164,7 @@ def handle_regular_answer(
164
164
# in an attached document set were available to all users in the channel.)
165
165
bypass_acl = False
166
166
167
- if not message_ts_to_respond_to and not is_bot_msg :
167
+ if not message_ts_to_respond_to and not is_slash_command :
168
168
# if the message is not "/onyx" command, then it should have a message ts to respond to
169
169
raise RuntimeError (
170
170
"No message timestamp to respond to in `handle_message`. This should never happen."
@@ -316,13 +316,14 @@ def _get_slack_answer(
316
316
return True
317
317
318
318
# Got an answer at this point, can remove reaction and give results
319
- update_emote_react (
320
- emoji = DANSWER_REACT_EMOJI ,
321
- channel = message_info .channel_to_respond ,
322
- message_ts = message_info .msg_to_respond ,
323
- remove = True ,
324
- client = client ,
325
- )
319
+ if not is_slash_command : # Slash commands don't have reactions
320
+ update_emote_react (
321
+ emoji = DANSWER_REACT_EMOJI ,
322
+ channel = message_info .channel_to_respond ,
323
+ message_ts = message_info .msg_to_respond ,
324
+ remove = True ,
325
+ client = client ,
326
+ )
326
327
327
328
if answer .answer_valid is False :
328
329
logger .notice (
0 commit comments