|
|
|
|
@ -6,6 +6,7 @@ using RoBot.Core.ConstValue;
|
|
|
|
|
using RoBot.Core.Helper;
|
|
|
|
|
using RoBot.Start.Dto.Wanted;
|
|
|
|
|
using RoBot.Start.Global;
|
|
|
|
|
using RoBot.Start.LogConfig;
|
|
|
|
|
using RoBot.Start.Message;
|
|
|
|
|
using RoBot.Start.Service.Dto;
|
|
|
|
|
|
|
|
|
|
@ -17,6 +18,9 @@ namespace RoBot.Start.Cmd
|
|
|
|
|
public class WantedPriceCmd
|
|
|
|
|
{
|
|
|
|
|
public static async Task<bool> Execute(MessageChain chain)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var textEntities = chain.Where(o => o is TextEntity).ToList();
|
|
|
|
|
List<TextEntity> convertList = textEntities.Cast<TextEntity>().ToList().Where(o => o.Text.Contains("道友的个人悬赏令") || o.Text.Contains("天机悬赏令")).ToList();
|
|
|
|
|
@ -65,8 +69,11 @@ namespace RoBot.Start.Cmd
|
|
|
|
|
await bot.SendMsg((uint)systemConfig.GroupQQ, msg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
Logs.Write($@"{DateTime.Now:yyyy-MM-dd HH:mm:ss} 悬赏令 发生异常,异常信息:{ex.Message},异常堆栈:{ex.StackTrace}");
|
|
|
|
|
}
|
|
|
|
|
return await Task.FromResult(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|