🐛 Remove setuid from player_id

This commit is contained in:
xtaodada 2024-07-05 22:48:16 +08:00
parent 3b50fc8d7a
commit a75c238a7b
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -74,10 +74,7 @@ class BindAccountPlugin(Plugin.Conversation):
context.chat_data["bind_account_plugin_data"] = bind_account_plugin_data
else:
bind_account_plugin_data.reset()
text = (
f"你好 {user.mention_markdown_v2()} "
f'{escape_markdown("请输入通行证ID非游戏玩家IDBOT将会通过通行证UID查找游戏UID。请选择要绑定的服务器或回复退出取消操作")}'
)
text = f"你好 {user.mention_markdown_v2()} " f'{escape_markdown("!请选择要绑定的服务器!或回复退出取消操作")}'
reply_keyboard = [["米游社", "HoYoLab"], ["退出"]]
await message.reply_markdown_v2(text, reply_markup=ReplyKeyboardMarkup(reply_keyboard, one_time_keyboard=True))
return CHECK_SERVER
@ -97,7 +94,7 @@ class BindAccountPlugin(Plugin.Conversation):
else:
await message.reply_text("选择错误,请重新选择")
return CHECK_SERVER
reply_keyboard = [["通过玩家ID", "通过账号ID"], ["退出"]]
reply_keyboard = [["通过账号ID"], ["退出"]]
await message.reply_markdown_v2(
"请选择你要绑定的方式", reply_markup=ReplyKeyboardMarkup(reply_keyboard, one_time_keyboard=True)
)
@ -110,11 +107,11 @@ class BindAccountPlugin(Plugin.Conversation):
if message.text == "退出":
await message.reply_text("退出任务", reply_markup=ReplyKeyboardRemove())
return ConversationHandler.END
if message.text == "通过玩家ID":
await message.reply_text(
"请输入你的玩家ID非通行证ID此 ID 在 游戏客户端 左/右下角。", reply_markup=ReplyKeyboardRemove()
)
return CHECK_PLAYER_ID
# if message.text == "通过玩家ID":
# await message.reply_text(
# "请输入你的玩家ID非通行证ID此 ID 在 游戏客户端 左/右下角。", reply_markup=ReplyKeyboardRemove()
# )
# return CHECK_PLAYER_ID
if message.text == "通过账号ID":
await message.reply_text(
"请输入你的通行证ID非玩家ID此 ID 在 社区APP '我的' 页面。", reply_markup=ReplyKeyboardRemove()
@ -262,7 +259,7 @@ class BindAccountPlugin(Plugin.Conversation):
async def update_player_info(self, player: Player, nickname: str):
player_info = await self.player_info_service.get(player)
if player_info is None:
if player_info is None or player_info.create_time is None:
player_info = PlayerInfoSQLModel(
user_id=player.user_id,
player_id=player.player_id,