🔭 合并功能
This commit is contained in:
parent
3eca072a56
commit
18fdeb63aa
@ -19,7 +19,7 @@ async def userid(context):
|
|||||||
message = await context.get_reply_message()
|
message = await context.get_reply_message()
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
text = f"**以下是当前对话的信息:** \n\n**ChatID**:`" + str(context.chat_id) + "`\n"
|
text = "**以下是当前对话的信息:** \n\n**ChatID**:`" + str(context.chat_id) + "`\n"
|
||||||
if message:
|
if message:
|
||||||
user_id = message.sender.id
|
user_id = message.sender.id
|
||||||
if message.sender.username:
|
if message.sender.username:
|
||||||
@ -30,8 +30,7 @@ async def userid(context):
|
|||||||
except TypeError:
|
except TypeError:
|
||||||
target = "**" + "死号" + "**"
|
target = "**" + "死号" + "**"
|
||||||
if not message.forward:
|
if not message.forward:
|
||||||
text1 = f"**以下是被回复消息的信息:** \n\n**道纹:** {target} \n"
|
text1 = "**以下是被回复消息的信息:** \n\n**道纹:** " + target + " \n" + "**用户ID:** `" + str(user_id) + "`"
|
||||||
f"**用户ID:** `{user_id}`"
|
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
user_f_id = message.forward.sender.id
|
user_f_id = message.forward.sender.id
|
||||||
@ -39,13 +38,9 @@ async def userid(context):
|
|||||||
target_f = "@" + message.forward.sender.username
|
target_f = "@" + message.forward.sender.username
|
||||||
else:
|
else:
|
||||||
target_f = "*" + message.forward.sender.first_name + "*"
|
target_f = "*" + message.forward.sender.first_name + "*"
|
||||||
text1 = f"**以下是被回复消息的信息:** \n\n**道纹:** {target} \n"
|
text1 = "**以下是被回复消息的信息:** \n\n**道纹:** " + target + " \n" + "**用户ID:** `" + str(user_id) + "` \n\n**以下是转发来源信息:** \n\n" + "**道纹:** " + target_f + " \n" + "**用户ID:** `" + str(user_f_id) + "`"
|
||||||
f"**用户ID:** `{user_id}` \n\n**以下是转发来源信息:** \n\n"
|
|
||||||
f"**道纹:** {target_f} \n"
|
|
||||||
f"**用户ID:** `{user_f_id}`"
|
|
||||||
except:
|
except:
|
||||||
text1 = f"**以下是被回复消息的信息:** \n\n**道纹:** {target} \n"
|
text1 = "**以下是被回复消息的信息:** \n\n**道纹:** " + target + " \n" + "**用户ID:** `" + str(user_id) + "` \n\n**此消息没有包含被转发用户的信息** \n\n"
|
||||||
f"**用户ID:** `{user_id}` \n\n**此消息没有包含被转发用户的信息** \n\n"
|
|
||||||
else:
|
else:
|
||||||
text1 = "出错了呜呜呜 ~ 无法获取所回复消息的信息。"
|
text1 = "出错了呜呜呜 ~ 无法获取所回复消息的信息。"
|
||||||
text = text + text1
|
text = text + text1
|
||||||
|
Loading…
Reference in New Issue
Block a user