Skip to content

Commit 0da78a1

Browse files
committed
chore: Replace empty response of /list with help text.
Signed-off-by: BURG3R5 <77491630+BURG3R5@users.noreply.github.com>
1 parent 9f42da1 commit 0da78a1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

slack_bot/runner.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,17 @@ def run_list_command(
182182
"type": "divider",
183183
},
184184
]
185+
if len(blocks) == 0:
186+
prompt = "This channel has not yet subscribed to anything."
187+
prompt += "You can subscribe to your favorite repositories "
188+
prompt += "using the `/subscribe` command. For more info, use the `/help` command."
189+
190+
blocks = [
191+
{
192+
"type": "mrkdwn",
193+
"text": prompt,
194+
},
195+
]
185196
return {
186197
"response_type": "ephemeral" if ephemeral else "in_channel",
187198
"blocks": blocks,

0 commit comments

Comments
 (0)