diff --git a/dislocker_slash.py b/dislocker_slash.py index 82036a6..a080391 100644 --- a/dislocker_slash.py +++ b/dislocker_slash.py @@ -1200,7 +1200,7 @@ async def on_button(interaction: discord.Interaction): for i in mouse_list["output_dict"].keys(): current_mouse_list = mouse_list['output_dict'][i] - if i['alt_name'] == None: + if current_mouse_list['alt_name'] == None: mouse_register_button = discord.ui.Button(style=discord.ButtonStyle.primary, label=f"{str(current_mouse_list['mouse_number'])} 番", custom_id=f"mouseregister_{str(pc_number)}_{str(keyboard_number)}_{str(current_mouse_list['mouse_number'])}") else: mouse_register_button = discord.ui.Button(style=discord.ButtonStyle.primary, label=f"{str(current_mouse_list['mouse_number'])} 番 | ({current_mouse_list['alt_name']})", custom_id=f"mouseregister_{str(pc_number)}_{str(keyboard_number)}_{str(current_mouse_list['mouse_number'])}")