示例#1
0
        public override Task <Message> Execute(ParserResult r)
        {
            if (r.Items["scope"] == "hour")
            {
                return(r.Event.Channel.SendMessage("Il est " + DateTime.Now.Hour + ":" + DateTime.Now.Minute + "."));
            }

            if (r.Items["scope"] == "date")
            {
                return(r.Event.Channel.SendMessage("On est le " + DateTools.DayOfWeekFr(DateTime.Now.DayOfWeek) + " " + DateTime.Now.Day + " " + DateTools.MonthNameFr(DateTime.Now.Month) + "."));
            }

            return(r.Event.Channel.SendMessage("Je n'ai pas compris la question. :thinking:"));
        }