mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-15 18:20:11 +00:00
Fix timeout handling in TW import
This commit is contained in:
parent
8ccee1d6fa
commit
8e527db05f
1 changed files with 4 additions and 2 deletions
|
|
@ -42,9 +42,11 @@ async def import_tupperware(ctx: CommandContext):
|
||||||
|
|
||||||
tupperware_page_embeds = []
|
tupperware_page_embeds = []
|
||||||
|
|
||||||
tw_msg: discord.Message = await ctx.client.wait_for("message", check=ensure_account, timeout=60.0 * 5)
|
try:
|
||||||
if not tw_msg:
|
tw_msg: discord.Message = await ctx.client.wait_for("message", check=ensure_account, timeout=60.0 * 5)
|
||||||
|
except asyncio.TimeoutError:
|
||||||
raise CommandError("Tupperware import timed out.")
|
raise CommandError("Tupperware import timed out.")
|
||||||
|
|
||||||
tupperware_page_embeds.append(tw_msg.embeds[0].to_dict())
|
tupperware_page_embeds.append(tw_msg.embeds[0].to_dict())
|
||||||
|
|
||||||
# Handle Tupperware pagination
|
# Handle Tupperware pagination
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue