fix: Exception
This commit is contained in:
parent
d8dbda7aba
commit
c1bffa219f
1 changed files with 9 additions and 4 deletions
7
bot.py
7
bot.py
|
@ -55,8 +55,13 @@ async def _addConnection(inter: disnake.ApplicationCommandInteraction):
|
||||||
|
|
||||||
await inter.edit_original_message(content="역할 데이터 등록을 시작합니다!")
|
await inter.edit_original_message(content="역할 데이터 등록을 시작합니다!")
|
||||||
async with LinkedRolesOAuth2(client_id=os.getenv("CLIENT_ID"), token=os.getenv("BOT_TOKEN")) as client:
|
async with LinkedRolesOAuth2(client_id=os.getenv("CLIENT_ID"), token=os.getenv("BOT_TOKEN")) as client:
|
||||||
async for rec in async_list(list_chunk(records, 3)):
|
async for rec in async_list(list_chunk(records, 2)):
|
||||||
|
try:
|
||||||
result = await client.register_role_metadata(records=tuple(rec), force=True)
|
result = await client.register_role_metadata(records=tuple(rec), force=True)
|
||||||
|
except Exception as e:
|
||||||
|
await inter.followup.send(e)
|
||||||
|
await asyncio.sleep(5)
|
||||||
|
else:
|
||||||
await inter.followup.send(result)
|
await inter.followup.send(result)
|
||||||
await asyncio.sleep(5)
|
await asyncio.sleep(5)
|
||||||
|
|
||||||
|
|
Reference in a new issue