feat: add "New Day" achievement
This commit is contained in:
parent
c05c45b57e
commit
576ea41d37
2
app.py
2
app.py
@ -138,6 +138,8 @@ async def update_metadata(response: Response, code: str, steam_id: str = Cookie(
|
||||
role.add_or_edit_metadata(key="tutorial", value=True)
|
||||
if achieve["apiname"] == "go_to_bed":
|
||||
role.add_or_edit_metadata(key="allperfect", value=True)
|
||||
if achieve["apiname"] == "new_day":
|
||||
role.add_or_edit_metadata(key="clear", value=True)
|
||||
success += 1
|
||||
percentage = round((success / total) * 100)
|
||||
role.add_or_edit_metadata(key="percentage", value=percentage)
|
||||
|
8
bot.py
8
bot.py
@ -33,6 +33,12 @@ async def _addConnection(inter: disnake.ApplicationCommandInteraction):
|
||||
description="튜토리얼 스테이지를 퍼펙트로 클리어해야 합니다.",
|
||||
type=RoleMetadataType.boolean_equal
|
||||
),
|
||||
RoleMetadataRecord(
|
||||
key="clear",
|
||||
name="New Day",
|
||||
description="모든 스테이지를 클리어해야 합니다.",
|
||||
type=RoleMetadataType.boolean_equal
|
||||
),
|
||||
RoleMetadataRecord(
|
||||
key="allperfect",
|
||||
name="Go to bed",
|
||||
@ -50,7 +56,7 @@ async def _addConnection(inter: disnake.ApplicationCommandInteraction):
|
||||
name="Percent of Achievement",
|
||||
description="% 이상의 도전 과제를 달성해야 합니다.",
|
||||
type=RoleMetadataType.interger_greater_than_or_equal
|
||||
),
|
||||
)
|
||||
]
|
||||
async with LinkedRolesOAuth2(client_id=os.getenv("CLIENT_ID"), token=os.getenv("BOT_TOKEN")) as client:
|
||||
try:
|
||||
|
Reference in New Issue
Block a user