diff --git a/asg_form/qqbot.cs b/asg_form/qqbot.cs index 71d3dda..23f7e5c 100644 --- a/asg_form/qqbot.cs +++ b/asg_form/qqbot.cs @@ -98,6 +98,32 @@ namespace asg_form } + [Command] + public string 近期赛程1() + { + try + { + TestDbContext testDb = new TestDbContext(); + int q = testDb.team_Games.Count(); + var t = (DateTime.Now); + var a = testDb.team_Games.Where(a => string.Compare(a.opentime, t.ToString()) >= 0).Take(7); + string msg = ""; + foreach (var b in a) + { + msg = $"{msg}\r\n{b.team1_name} VS {b.team2_name}\r\n时间:{b.opentime.ToString()}"; + } + return msg; + + + } + catch + { + return "出现错误"; + } + + } + + [Command] public string 查询冠军() {