Example #1
0
        private ReplyModel GetTextReply(string token, string text, Event msg = null)
        {
            return(LineHelper.NaNaSamgoReply(token, text, msg));

            //if (text.StartsWith("戰力"))
            //{
            //    var q = text.Split(' ')[1].Trim();
            //    var response = DapperHelper.Search<UserInfo>(
            //        connectionString,
            //        $" SELECT SamgoGame.[Role], SamgoGame.[Official], SamgoGame.[Legion], SamgoGamePower.[Power] , SamgoGamePower.[Time] FROM SamgoGame INNER JOIN SamgoGamePower ON SamgoGamePower.SeqNo = SamgoGame.SeqNo where SamgoGame.[Role] like N'%{q}%';"
            //        ).OrderByDescending(x => x.Power);
            //    var temp = "";
            //    temp += response.FirstOrDefault().Role + "\n";
            //    foreach (var a in response)
            //    {
            //        temp += a.Power;
            //        temp += " " + a.Time;
            //        temp += "\n";
            //    }
            //    return new ReplyModel()
            //    {
            //        replyToken = token,
            //        messages = new List<ReplyMessage>()
            //    {
            //        new ReplyMessage()
            //        {
            //            type = "text",
            //            text=temp
            //        }
            //    }
            //    };
            //}
            //else
            //{
            //    return new ReplyModel()
            //    {
            //        replyToken = token

            //    };
            //}
        }