自前のデバイスは0番として処理するように
This commit is contained in:
parent
ace3cab44b
commit
d932730ed7
1 changed files with 13 additions and 13 deletions
26
dislocker.py
26
dislocker.py
|
@ -355,12 +355,12 @@ class DL():
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if kwargs["keyboard_number"] == "own":
|
if kwargs["keyboard_number"] == "0":
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
user_info["keyboard_number"] = int(kwargs["keyboard_number"])
|
user_info["keyboard_number"] = int(kwargs["keyboard_number"])
|
||||||
|
|
||||||
if kwargs["mouse_number"] == "own":
|
if kwargs["mouse_number"] == "0":
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
user_info["mouse_number"] = int(kwargs["mouse_number"])
|
user_info["mouse_number"] = int(kwargs["mouse_number"])
|
||||||
|
@ -913,12 +913,12 @@ class ReasonModal(discord.ui.Modal):
|
||||||
keyboard_number = custom_id_split[2]
|
keyboard_number = custom_id_split[2]
|
||||||
mouse_number = custom_id_split[3]
|
mouse_number = custom_id_split[3]
|
||||||
|
|
||||||
if keyboard_number == "own":
|
if keyboard_number == "0":
|
||||||
keyboard_number_show = "自前"
|
keyboard_number_show = "自前"
|
||||||
else:
|
else:
|
||||||
keyboard_number_show = keyboard_number
|
keyboard_number_show = keyboard_number
|
||||||
|
|
||||||
if mouse_number == "own":
|
if mouse_number == "0":
|
||||||
mouse_number_show = "自前"
|
mouse_number_show = "自前"
|
||||||
else:
|
else:
|
||||||
mouse_number_show = mouse_number
|
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_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_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)
|
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)
|
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]
|
pc_number = custom_id_split[1]
|
||||||
keyboard_number = custom_id_split[2]
|
keyboard_number = custom_id_split[2]
|
||||||
mouse_list = dislocker.get_mouse_list()
|
mouse_list = dislocker.get_mouse_list()
|
||||||
if keyboard_number == "own":
|
if keyboard_number == "0":
|
||||||
keyboard_number_show = "自前"
|
keyboard_number_show = "自前"
|
||||||
else:
|
else:
|
||||||
keyboard_number_show = keyboard_number
|
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_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_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)
|
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)
|
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]
|
keyboard_number = custom_id_split[2]
|
||||||
mouse_number = custom_id_split[3]
|
mouse_number = custom_id_split[3]
|
||||||
|
|
||||||
if keyboard_number == "own":
|
if keyboard_number == "0":
|
||||||
keyboard_number_show = "自前"
|
keyboard_number_show = "自前"
|
||||||
else:
|
else:
|
||||||
keyboard_number_show = keyboard_number
|
keyboard_number_show = keyboard_number
|
||||||
|
|
||||||
if mouse_number == "own":
|
if mouse_number == "0":
|
||||||
mouse_number_show = "自前"
|
mouse_number_show = "自前"
|
||||||
else:
|
else:
|
||||||
mouse_number_show = mouse_number
|
mouse_number_show = mouse_number
|
||||||
|
@ -1280,12 +1280,12 @@ async def on_button(interaction: discord.Interaction):
|
||||||
keyboard_number = custom_id_split[2]
|
keyboard_number = custom_id_split[2]
|
||||||
mouse_number = custom_id_split[3]
|
mouse_number = custom_id_split[3]
|
||||||
|
|
||||||
if keyboard_number == "own":
|
if keyboard_number == "0":
|
||||||
keyboard_number_show = "自前"
|
keyboard_number_show = "自前"
|
||||||
else:
|
else:
|
||||||
keyboard_number_show = keyboard_number
|
keyboard_number_show = keyboard_number
|
||||||
|
|
||||||
if mouse_number == "own":
|
if mouse_number == "0":
|
||||||
mouse_number_show = "自前"
|
mouse_number_show = "自前"
|
||||||
else:
|
else:
|
||||||
mouse_number_show = mouse_number
|
mouse_number_show = mouse_number
|
||||||
|
@ -1330,12 +1330,12 @@ async def on_button(interaction: discord.Interaction):
|
||||||
keyboard_number = custom_id_split[2]
|
keyboard_number = custom_id_split[2]
|
||||||
mouse_number = custom_id_split[3]
|
mouse_number = custom_id_split[3]
|
||||||
|
|
||||||
if keyboard_number == "own":
|
if keyboard_number == "0":
|
||||||
keyboard_number_show = "自前"
|
keyboard_number_show = "自前"
|
||||||
else:
|
else:
|
||||||
keyboard_number_show = keyboard_number
|
keyboard_number_show = keyboard_number
|
||||||
|
|
||||||
if mouse_number == "own":
|
if mouse_number == "0":
|
||||||
mouse_number_show = "自前"
|
mouse_number_show = "自前"
|
||||||
else:
|
else:
|
||||||
mouse_number_show = mouse_number
|
mouse_number_show = mouse_number
|
||||||
|
|
Loading…
Reference in a new issue