Skip to content

Commit

Permalink
SI-45 /appstore lookup_order_id: Use deferred response, as fetching c…
Browse files Browse the repository at this point in the history
…an be a little slow
  • Loading branch information
dwrss committed Sep 7, 2024
1 parent ead380f commit ab1a3a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion botto/slash_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,9 @@ async def lookup_order_id(
app = await testflight_storage.fetch_app(app_record_id)
transactions = await app_store_server.lookup_order_id(app, order_id)

await ctx.response.defer(ephemeral=True, thinking=True)
if not transactions:
await ctx.response.send_message("No transactions found", ephemeral=True)
await ctx.followup.send("No transactions found", ephemeral=True)
return
if len(transactions) > 1:
for i, transaction in enumerate(transactions):
Expand Down

0 comments on commit ab1a3a6

Please sign in to comment.