From 33fd438f3335b375317435cc8153686434730525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=95=98=EB=88=84?= Date: Sun, 26 Mar 2023 11:56:39 +0900 Subject: [PATCH] feat(bot): maybe we could use localizations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 하누 --- bot.py | 50 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/bot.py b/bot.py index 539d5b6..6f9da97 100644 --- a/bot.py +++ b/bot.py @@ -30,32 +30,50 @@ async def _addConnection(inter: disnake.ApplicationCommandInteraction): RoleMetadataRecord( key="honor_roll", name="Honor roll", - description="튜토리얼 스테이지를 퍼펙트로 클리어해야 합니다.", - type=RoleMetadataType.boolean_equal + description="Perfect the tutorial", + type=RoleMetadataType.boolean_equal, + name_localizations={ + "ko": "" + }, + description_localizations={ + "ko": "" + } ), RoleMetadataRecord( key="new_day", name="New Day", - description="모든 스테이지를 클리어해야 합니다.", - type=RoleMetadataType.boolean_equal + description="Get through the morning", + type=RoleMetadataType.boolean_equal, + name_localizations={ + "ko": "" + }, + description_localizations={ + "ko": "" + } ), RoleMetadataRecord( key="go_to_bed", name="Go to bed", - description="모든 스테이지를 퍼펙트로 클리어해야 합니다.", - type=RoleMetadataType.boolean_equal - ), - RoleMetadataRecord( - key="complete", - name="ALL CLEAR!!", - description="게임의 도전 과제를 모두 달성해야 합니다.", - type=RoleMetadataType.boolean_equal + description="Get all perfect scores", + type=RoleMetadataType.boolean_equal, + name_localizations={ + "ko": "" + }, + description_localizations={ + "ko": "" + } ), RoleMetadataRecord( key="percentage", - name="Percent of Achievement", - description="% 이상의 도전 과제를 달성해야 합니다.", - type=RoleMetadataType.interger_greater_than_or_equal + name="% of Achievements", + description="% of cleared achievements", + type=RoleMetadataType.interger_greater_than_or_equal, + name_localizations={ + "ko": "" + }, + description_localizations={ + "ko": "" + } ) ] async with LinkedRolesOAuth2(client_id=os.getenv("CLIENT_ID"), token=os.getenv("BOT_TOKEN")) as client: @@ -66,4 +84,4 @@ async def _addConnection(inter: disnake.ApplicationCommandInteraction): else: await inter.edit_original_message(content=f"> :star2: 역할 추가가 완료되었습니다!\n{result}") -bot.run(os.getenv("BOT_TOKEN")) \ No newline at end of file +bot.run(os.getenv("BOT_TOKEN"))