You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
874 B
C#

using Lagrange.Core.Message;
using Lagrange.Core.Message.Entity;
using RoBot.Start.Service.Impl;
namespace RoBot.Start.Cmd
{
/// <summary>
/// 保存或更新物品价格
/// </summary>
public class InertOrUpdateGoodsCmd
{
public static async Task<bool> Execute(MessageChain chain)
{
foreach (var item in chain)
{
if (item is TextEntity)
{
TextEntity txe = item as TextEntity;
if (string.IsNullOrWhiteSpace(txe.Text) is false)
{
if (txe.Text.Contains("不鼓励不保障"))
{
GoodsService.AnalysisGoodsText(txe.Text);
}
}
}
}
return true;
}
}
}