@@ -88,6 +88,8 @@ async def setup_menu_callback(update: Update, context: ContextTypes.DEFAULT_TYPE
8888 "set_p_lose" : ("points_loss" , "晒损送多少分?" ),
8989 "set_p_limit" : ("limit_post_daily" , "每日晒单上限是多少次?\n (输入 -2 表示无限制)" ),
9090 "set_rank" : ("rank_config" , "请输入段位规则 JSON (建议5档):\n 例如: `{\" 0\" :\" 🌱茁壮韭菜\" , \" 100\" :\" 💎钻石双手\" , \" 500\" :\" 🐋潜水巨鲸\" , \" 2000\" :\" 📈K线主宰\" , \" 5000\" :\" 🚀交易战神\" }`" ),
91+ # [新增] 设置发货人ID
92+ "set_seller" : ("seller_id" , "请输入 **发货人** 的 Telegram ID (数字):\n (让他对自己发送 /id 即可获取,如果不设置则不显示)" )
9193 }
9294
9395 if data in input_map :
@@ -136,6 +138,9 @@ def limit_str(v): return "♾️无限" if v == -2 else f"{v}次"
136138 [InlineKeyboardButton ("设晒盈分" , callback_data = "set_p_win" ), InlineKeyboardButton ("设晒损分" , callback_data = "set_p_lose" )],
137139 [InlineKeyboardButton ("🏅 设置段位表" , callback_data = "set_rank" )],
138140
141+ # [新增] 发货人设置
142+ [InlineKeyboardButton (f"📦 发货人ID: { val (info ['seller_id' ])} " , callback_data = "set_seller" )],
143+
139144 [InlineKeyboardButton (f"早报 { ic (info ['sub_news' ])} " , callback_data = "tg_news" ), InlineKeyboardButton ("设ID" , callback_data = "set_news" )],
140145 [InlineKeyboardButton (f"分析 { ic (info ['sub_analysis' ])} " , callback_data = "tg_analysis" ), InlineKeyboardButton ("设ID" , callback_data = "set_ana" )],
141146 [InlineKeyboardButton (f"战绩 { ic (info ['sub_marketing' ])} " , callback_data = "tg_marketing" ), InlineKeyboardButton ("设ID" , callback_data = "set_mkt" )],
@@ -153,7 +158,7 @@ async def save_input(update: Update, context: ContextTypes.DEFAULT_TYPE):
153158 text = update .message .text .strip ()
154159
155160 # 1. 数字校验
156- if any (x in key for x in ["points" , "topic" , "limit" ]):
161+ if any (x in key for x in ["points" , "topic" , "limit" , "seller_id" ]):
157162 try :
158163 val = int (text )
159164 if val == - 1 and "topic" in key : val = None
0 commit comments