feat:猜成语模糊匹配
This commit is contained in:
@@ -29,14 +29,13 @@ namespace RoBot.Start.Cmd
|
||||
Dictionary<string, string> dict = AppConfigHelper.GetSection<Dictionary<string, string>>("猜成语");
|
||||
if (dict?.Count > 0)
|
||||
{
|
||||
string val = "";
|
||||
foreach (var item in dict)
|
||||
{
|
||||
if (emojiString.Contains(item.Value))
|
||||
if (emojiString.Contains(item.Key))
|
||||
{
|
||||
var systemConfig = GlobalConfig.ConfigSetting;
|
||||
var bot = GlobalConfig.BotContext;
|
||||
var groupMessageChain = MessageBuilder.Group((uint)systemConfig.GroupQQ).Forward(chain).Text(val);
|
||||
var groupMessageChain = MessageBuilder.Group((uint)systemConfig.GroupQQ).Forward(chain).Text(item.Value);
|
||||
await bot.SendMessage(groupMessageChain.Build());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="appsettings.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
"💧🏾🔥🥵": "水深火热",
|
||||
"😞🌸😭👧🏻": "愁眉苦脸",
|
||||
"🌬️🌶️⏏️🎤": "吹拉弹唱",
|
||||
"🦩🧍🐔👨👩👧👦": "鹤立鸡群",
|
||||
"🦩🧍🐔": "鹤立鸡群",
|
||||
"🕸️👁️🐟🚢": "望眼欲穿",
|
||||
"👩🎨🐍🦢🐾": "画蛇添足",
|
||||
"🎨🐍🦢🐾": "画蛇添足",
|
||||
"🍃🚌👌🐲": "叶公好龙",
|
||||
"🌸🍐🐯🥄": "花里胡哨",
|
||||
"❤️🤔🍅🍊": "心想事成",
|
||||
@@ -21,11 +21,12 @@
|
||||
"🥃💧🚗💴": "杯水车薪",
|
||||
"🍵🍚❌🤔": "茶饭不思",
|
||||
"👨⛰️👨🌊": "人山人海",
|
||||
"🤚🤖👨👩👧👧": "白手起家",
|
||||
"🤚🤖👨": "白手起家",
|
||||
"🐷👫🐶👉": "猪朋狗友",
|
||||
"7️⃣👆8️⃣👇": "七上八下",
|
||||
"🔪⛏️🔥🌱": "刀耕火种",
|
||||
"✉️🍅🥚🥚": "信誓旦旦",
|
||||
"✍️🐍👇🦶": "画蛇添足"
|
||||
"✍️🐍👇🦶": "画蛇添足",
|
||||
"👗🐉💃✋": "群龙无首"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user