0
0
Fork 0

fix: can only have 5 changes in one connection

This commit is contained in:
하누 2023-03-23 08:35:18 +00:00 committed by GitHub
parent afd100af27
commit f29a019436
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 12 deletions

4
bot.py
View file

@ -60,10 +60,10 @@ async def _addConnection(inter: disnake.ApplicationCommandInteraction):
]
async with LinkedRolesOAuth2(client_id=os.getenv("CLIENT_ID"), token=os.getenv("BOT_TOKEN")) as client:
try:
await client.register_role_metadata(records=tuple(records), force=True)
result = await client.register_role_metadata(records=tuple(records), force=True)
except Exception as e:
await inter.edit_original_message(e)
else:
await inter.edit_original_message(content="> :star2: 역할 추가가 완료되었습니다!")
await inter.edit_original_message(content=f"> :star2: 역할 추가가 완료되었습니다!\n{result}")
bot.run(os.getenv("BOT_TOKEN"))