From d932730ed7ed7a74b7f547da307fd023c3dacc7b Mon Sep 17 00:00:00 2001 From: suti7yk5032 Date: Tue, 1 Oct 2024 11:36:27 +0900 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=89=8D=E3=81=AE=E3=83=87=E3=83=90?= =?UTF-8?q?=E3=82=A4=E3=82=B9=E3=81=AF0=E7=95=AA=E3=81=A8=E3=81=97?= =?UTF-8?q?=E3=81=A6=E5=87=A6=E7=90=86=E3=81=99=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dislocker.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/dislocker.py b/dislocker.py index b3d64f5..9c7418a 100644 --- a/dislocker.py +++ b/dislocker.py @@ -355,12 +355,12 @@ class DL(): else: pass - if kwargs["keyboard_number"] == "own": + if kwargs["keyboard_number"] == "0": pass else: user_info["keyboard_number"] = int(kwargs["keyboard_number"]) - if kwargs["mouse_number"] == "own": + if kwargs["mouse_number"] == "0": pass else: user_info["mouse_number"] = int(kwargs["mouse_number"]) @@ -913,12 +913,12 @@ class ReasonModal(discord.ui.Modal): keyboard_number = custom_id_split[2] mouse_number = custom_id_split[3] - if keyboard_number == "own": + if keyboard_number == "0": keyboard_number_show = "自前" else: keyboard_number_show = keyboard_number - if mouse_number == "own": + if mouse_number == "0": mouse_number_show = "自前" else: mouse_number_show = mouse_number @@ -1223,7 +1223,7 @@ async def on_button(interaction: discord.Interaction): keyboard_register_button = discord.ui.Button(style=discord.ButtonStyle.primary, label=f"{str(current_keyboard_list['keyboard_number'])} 番 | ({current_keyboard_list['alt_name']})", custom_id=f"keyboardregister_{str(pc_number)}_{str(current_keyboard_list['keyboard_number'])}") keyboard_register_view.add_item(keyboard_register_button) - keyboard_not_register_button = discord.ui.Button(style=discord.ButtonStyle.primary, label="キーボードは自前", custom_id=f"keyboardregister_{str(pc_number)}_own") + keyboard_not_register_button = discord.ui.Button(style=discord.ButtonStyle.primary, label="キーボードは自前", custom_id=f"keyboardregister_{str(pc_number)}_0") keyboard_register_view.add_item(keyboard_not_register_button) await interaction.response.send_message(f"# :keyboard: キーボードのデバイス番号を選んでください!\n>>> # PC番号 | {str(pc_number)}", view=keyboard_register_view, ephemeral=True) @@ -1233,7 +1233,7 @@ async def on_button(interaction: discord.Interaction): pc_number = custom_id_split[1] keyboard_number = custom_id_split[2] mouse_list = dislocker.get_mouse_list() - if keyboard_number == "own": + if keyboard_number == "0": keyboard_number_show = "自前" else: keyboard_number_show = keyboard_number @@ -1246,7 +1246,7 @@ async def on_button(interaction: discord.Interaction): 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'])}") mouse_register_view.add_item(mouse_register_button) - mouse_not_register_button = discord.ui.Button(style=discord.ButtonStyle.primary, label="マウスは自前", custom_id=f"mouseregister_{str(pc_number)}_{str(keyboard_number)}_own") + mouse_not_register_button = discord.ui.Button(style=discord.ButtonStyle.primary, label="マウスは自前", custom_id=f"mouseregister_{str(pc_number)}_{str(keyboard_number)}_0") mouse_register_view.add_item(mouse_not_register_button) await interaction.response.send_message(f"# :mouse_three_button: マウスのデバイス番号を選んでください!\n>>> # PC番号 | {str(pc_number)}\n# キーボード番号 | {str(keyboard_number_show)}", view=mouse_register_view, ephemeral=True) @@ -1256,12 +1256,12 @@ async def on_button(interaction: discord.Interaction): keyboard_number = custom_id_split[2] mouse_number = custom_id_split[3] - if keyboard_number == "own": + if keyboard_number == "0": keyboard_number_show = "自前" else: keyboard_number_show = keyboard_number - if mouse_number == "own": + if mouse_number == "0": mouse_number_show = "自前" else: mouse_number_show = mouse_number @@ -1280,12 +1280,12 @@ async def on_button(interaction: discord.Interaction): keyboard_number = custom_id_split[2] mouse_number = custom_id_split[3] - if keyboard_number == "own": + if keyboard_number == "0": keyboard_number_show = "自前" else: keyboard_number_show = keyboard_number - if mouse_number == "own": + if mouse_number == "0": mouse_number_show = "自前" else: mouse_number_show = mouse_number @@ -1330,12 +1330,12 @@ async def on_button(interaction: discord.Interaction): keyboard_number = custom_id_split[2] mouse_number = custom_id_split[3] - if keyboard_number == "own": + if keyboard_number == "0": keyboard_number_show = "自前" else: keyboard_number_show = keyboard_number - if mouse_number == "own": + if mouse_number == "0": mouse_number_show = "自前" else: mouse_number_show = mouse_number