From e355da1656142f9132d631a7e423d724c5fe16d0 Mon Sep 17 00:00:00 2001 From: lenlino <65199014+lenlino@users.noreply.github.com> Date: Fri, 24 May 2024 11:21:50 +0900 Subject: [PATCH] senntaiku --- commands/ChangeWeightCommand.py | 3 ++- commands/CreateWeightCommand.py | 3 ++- main.py | 2 -- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/commands/ChangeWeightCommand.py b/commands/ChangeWeightCommand.py index 31115c9..47bea49 100644 --- a/commands/ChangeWeightCommand.py +++ b/commands/ChangeWeightCommand.py @@ -39,7 +39,8 @@ async def get_chara_types(ctx: discord.AutocompleteContext): @discord.slash_command(name="change_weight", description="Change weight", guild_ids=["1118740618882072596"]) async def change_weight_command(self, ctx, chara_id: discord.Option(required=True, description="キャラ", input_type=str, - options=main.characters), + autocomplete=discord.utils.basic_autocomplete( + main.characters)), type_id: discord.Option(required=True, description="基準名", input_type=str, autocomplete=discord.utils.basic_autocomplete( get_chara_types))): diff --git a/commands/CreateWeightCommand.py b/commands/CreateWeightCommand.py index 6dd3c97..f13af4f 100644 --- a/commands/CreateWeightCommand.py +++ b/commands/CreateWeightCommand.py @@ -20,7 +20,8 @@ async def get_chara_types(ctx: discord.AutocompleteContext): @discord.slash_command(name="create_weight", description="Create weight", guild_ids=["1118740618882072596"]) async def create_weight_command(self, ctx, chara_id: discord.Option(required=True, description="キャラ", input_type=str, - options=main.characters), + autocomplete=discord.utils.basic_autocomplete( + main.characters)), jp_name: discord.Option(required=True, description="基準の日本語名(攻撃型、回復型など)"), en_name: discord.Option(required=True, description="基準の英語名・スペース、記号禁止(attack、healなど)")): await ctx.defer() diff --git a/main.py b/main.py index 916e698..2f4d95c 100644 --- a/main.py +++ b/main.py @@ -74,8 +74,6 @@ async def regi_weight_task(): characters.append(discord.OptionChoice(name=name, value=key)) characters_name[key] = name - bot.reload_extension('commands.CreateWeightCommand') - bot.reload_extension('commands.ChangeWeightCommand') channel = bot.get_channel(1242779790914752592) async for mes in channel.history(before=(datetime.datetime.now() + datetime.timedelta(days=-3))):