public void ProcessGroupMessage(GroupMessageReceivedContext context) { string ec, et; ec = IniReadValue("com", "esiserenity", "C:\\ERC.ini"); et = IniReadValue("com", "esitranquility", "C:\\ERC.ini"); Jitas J = new Jitas(); character C = new character(); string res = "null"; string com = context.Message.Substring(0, 1); string coml = ""; if (context.Message.Length > 3) { coml = context.Message.Substring(0, 3); } else { coml = context.Message.Substring(0, 1); } if (context.Message == "帮助") { _mahuaApi.SendGroupMessage(context.FromGroup) .Text("EVE查询机器人使用说明") .Face("12").Newline() .Text("====物品查价功能").Face("151").Newline() .Text("|\t'" + ec + "'+精确名称(晨曦中文)\n|").Newline() .Text("|\t'" + et + "'+精确名称(宁静英文)\n|").Newline() .Face("54").Text("就是这样喵~").Face("54") .Done(); } else if (com == ec) { string ser = context.Message.Replace(ec, ""); res = J.esipriceget(ser); _mahuaApi.SendGroupMessage(context.FromGroup) .Text(ser + "晨曦查询结果:") .Newline() .Text(res) .Done(); } else if (com == et) { string ser1 = context.Message.Replace(et, ""); res = J.esipricegettq(ser1); _mahuaApi.SendGroupMessage(context.FromGroup) .Text(ser1 + "宁静查询结果:") .Newline() .Text(res) .Done(); } else if (context.Message == "更新日志") { _mahuaApi.SendGroupMessage(context.FromGroup) .Newline() .Text("当前版本Public1.0\r\n开源1.0版本,仅提供最基础的吉他市场查询功能。\r\n开发者邮箱:[email protected]\r\n感谢大家的选择和使用!\r\n获取更多功能联系开发者") .Done(); } }
public void ProcessFriendMessage(PrivateMessageFromFriendReceivedContext context) { Jitas J = new Jitas(); string res = "null"; string com = context.Message.Substring(0, 1); string ser = context.Message.Replace("~", ""); string ser1 = context.Message.Replace("*", ""); if (context.Message == "帮助") { _mahuaApi.SendPrivateMessage(context.FromQq) .Text("EVE查询机器人使用说明") .Face("12").Newline() .Text("====物品查价功能").Face("151").Newline() .Text("|\t'*'+精确物品名称(宁静)\n|").Newline() .Text("|\t'~'+精确物品名称(晨曦)\n|").Newline() .Face("54").Text("更多功能请体验完整版").Face("54") .Done(); } else if (com == "~") { res = J.esipriceget(ser); _mahuaApi.SendPrivateMessage(context.FromQq) .Text(ser + "晨曦:") .Newline() .Text(res) .Done(); } else if (com == "*") { res = J.esipricegettqc(ser1); _mahuaApi.SendPrivateMessage(context.FromQq) .Text(ser1 + "宁静:") .Newline() .Text(res) .Done(); } }