Skip to content

Commit

Permalink
action_items: make remaining error/success messages ephemeral (#56)
Browse files Browse the repository at this point in the history
Co-authored-by: nova <[email protected]>
  • Loading branch information
wizzdom and novanai authored Nov 18, 2024
1 parent 6bb0a70 commit bba617d
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/extensions/action_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
@arc.with_hook(restrict_to_channels(channel_ids=[CHANNEL_IDS["action-items"]]))
@arc.with_hook(restrict_to_roles(role_ids=[ROLE_IDS["committee"]]))
@arc.slash_command(
"action_items", "Display the action items from the MD", is_dm_enabled=False
"action_items",
"Display the action items from the MD",
is_dm_enabled=False,
autodefer=arc.AutodeferMode.EPHEMERAL,
)
async def get_action_items(
ctx: arc.GatewayContext,
Expand Down Expand Up @@ -55,7 +58,10 @@ async def get_action_items(
)

if not action_items_section:
await ctx.respond("❌ No `Action Items` section found.")
await ctx.respond(
"❌ No `Action Items` section found.",
flags=hikari.MessageFlag.EPHEMERAL,
)
return

# Get the matched content (excluding the "Action Items" heading itself)
Expand Down Expand Up @@ -98,7 +104,10 @@ async def get_action_items(
)

# respond with success if it executes successfully
await ctx.respond("✅ Action Items sent successfully!")
await ctx.respond(
"✅ Action Items sent successfully!",
flags=hikari.MessageFlag.EPHEMERAL,
)
return


Expand Down

0 comments on commit bba617d

Please sign in to comment.