diff --git a/XiaoXiaoRoBot/Cmd/GoodsUpShopCmd.cs b/XiaoXiaoRoBot/Cmd/GoodsUpShopCmd.cs index ccd7334..f159a7c 100644 --- a/XiaoXiaoRoBot/Cmd/GoodsUpShopCmd.cs +++ b/XiaoXiaoRoBot/Cmd/GoodsUpShopCmd.cs @@ -25,6 +25,7 @@ namespace RoBot.Start.Cmd if (chain.Count is 3 or 5 && forwardEntities.Count > 0 && textEntities.Count > 0) { bool any = textEntities.Cast().ToList().Where(o => o.Text.Contains("查上架") || o.Text.Contains("查价格")).Any(); + bool upCmd = textEntities.Cast().ToList().Where(o => (o.Text.Contains("查上架") && o.Text.Contains("-f")) || (o.Text.Contains("查价格") && o.Text.Contains("-f"))).Any(); if (any) { if (textEntities.Count == 0) return false; @@ -43,7 +44,7 @@ namespace RoBot.Start.Cmd (desc.Contains("名字") && desc.Contains("拥有数量")) ) { - _ = Herbal(chain, desc); + _ = Herbal(chain, desc, upCmd); } } } @@ -61,7 +62,7 @@ namespace RoBot.Start.Cmd /// 计算药材 /// /// - private static async Task Herbal(MessageChain chain, string text) + private static async Task Herbal(MessageChain chain, string text, bool upCmd) { List results = []; var lines = text.Split(new[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries); @@ -104,16 +105,26 @@ namespace RoBot.Start.Cmd fee += Math.Round(Utils.CalculateFee(nicePrice) * num, 0); - msg += $"确认坊市上架{item.Name} {(int)current.Price - 100000} {num}\n"; + if (upCmd) + { + msg += $"确认坊市上架{item.Name} {(int)current.Price - 100000} {num}|"; + } + else + { + msg += $"确认坊市上架{item.Name} {(int)current.Price - 100000} {num}\n"; + } } } if (string.IsNullOrWhiteSpace(msg) is false) { - msg += "\r\n"; - msg += "使用前请先@小小查看坊市药材,过完一遍以获取最新价格\r\n当前价格为坊市价格-10w\r\n"; - msg += $"总价值约:{Utils.FormatNumberToChineseUnit(totalPrice)}\r\n"; - msg += $"手续费约:{Utils.FormatNumberToChineseUnit(fee)}\r\n"; - msg += $"到账约:{Utils.FormatNumberToChineseUnit(totalPrice - fee)}"; + if (!upCmd) + { + msg += "\r\n"; + msg += "使用前请先@小小查看坊市药材,过完一遍以获取最新价格\r\n当前价格为坊市价格-10w\r\n"; + msg += $"总价值约:{Utils.FormatNumberToChineseUnit(totalPrice)}\r\n"; + msg += $"手续费约:{Utils.FormatNumberToChineseUnit(fee)}\r\n"; + msg += $"到账约:{Utils.FormatNumberToChineseUnit(totalPrice - fee)}"; + } var systemConfig = GlobalConfig.ConfigSetting; var bot = GlobalConfig.BotContext; diff --git a/XiaoXiaoRoBot/appsettings.json b/XiaoXiaoRoBot/appsettings.json index ae159d8..4c7464c 100644 --- a/XiaoXiaoRoBot/appsettings.json +++ b/XiaoXiaoRoBot/appsettings.json @@ -114,6 +114,10 @@ "1️⃣🕸️🈚️💰": "一往无前", "📢🍜🔔🐉": "八面玲珑", "🐍🐔🆘👨": "舍己救人", - "👂👀": "耳目一新" + "👂👀": "耳目一新", + "🍊🐠⬇️🐦": "沉鱼落雁", + "🤍🐳🥩💃": "心惊肉跳", + "👚💉🚀☃️": "一针见血", + "💍🌸🧶🛕": "借花献佛" } } \ No newline at end of file