1
0

fix: we don't need complete

This commit is contained in:
オスカー、 2023-03-26 03:30:09 +00:00 committed by GitHub
parent 33fd438f33
commit f81819eba1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 12 deletions

4
app.py
View File

@ -139,10 +139,6 @@ async def update_metadata(response: Response, code: str, steam_id: str = Cookie(
success += 1
percentage = round((success / total) * 100)
role.add_or_edit_metadata(key="percentage", value=percentage)
if success == total:
role.add_or_edit_metadata(key="complete", value=True)
else:
role.add_or_edit_metadata(key="complete", value=False)
await user.edit_role_connection(role)
response.set_cookie(key="steam_id", value="", max_age=1)
return "Successfully connected! Now go back to Discord and check result."

16
bot.py
View File

@ -33,10 +33,10 @@ async def _addConnection(inter: disnake.ApplicationCommandInteraction):
description="Perfect the tutorial",
type=RoleMetadataType.boolean_equal,
name_localizations={
"ko": ""
"ko": "우등생"
},
description_localizations={
"ko": ""
"ko": "튜토리얼 스테이지를 퍼펙트로 클리어해야 합니다."
}
),
RoleMetadataRecord(
@ -45,10 +45,10 @@ async def _addConnection(inter: disnake.ApplicationCommandInteraction):
description="Get through the morning",
type=RoleMetadataType.boolean_equal,
name_localizations={
"ko": ""
"ko": "밝아오는 새로운 아침"
},
description_localizations={
"ko": ""
"ko": "모든 스테이지를 클리어해야 합니다."
}
),
RoleMetadataRecord(
@ -57,10 +57,10 @@ async def _addConnection(inter: disnake.ApplicationCommandInteraction):
description="Get all perfect scores",
type=RoleMetadataType.boolean_equal,
name_localizations={
"ko": ""
"ko": "자러 갈 시간"
},
description_localizations={
"ko": ""
"ko": "모든 스테이지를 퍼펙트로 클리어해야 합니다."
}
),
RoleMetadataRecord(
@ -69,10 +69,10 @@ async def _addConnection(inter: disnake.ApplicationCommandInteraction):
description="% of cleared achievements",
type=RoleMetadataType.interger_greater_than_or_equal,
name_localizations={
"ko": ""
"ko": "% 도전 과제 달성률"
},
description_localizations={
"ko": ""
"ko": "%의 도전 과제를 달성해야 합니다."
}
)
]