From 87573da877994d95e4da7d20e312cc81a1c81320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=AF=85?= <2667210109@qq.com> Date: Fri, 25 Oct 2024 20:39:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- asg_form/qqbot.cs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) 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 查询冠军() {