Exemplo n.º 1
0
        public bool chp;    //覇者の通知

        public botController(AbstractService service, EventAdmin admin, bool rodos = true, bool chp = false)
        {
            this.service = service;
            this.admin   = admin;
            this.rodos   = rodos; //バル・ロドス通知
            this.chp     = chp;

            registEvent();
        }
        private void init(configure conf)
        {
            HttpGetUrl  = "https://akakitune87.net/api/v4/pso2emergency";
            chanpionUrl = "https://xpow0wu0s5.execute-api.ap-northeast-1.amazonaws.com/v2";

            hc        = new HttpClient();
            emgGetter = new aki_luaEventGetter(HttpGetUrl, hc);
            chGetter  = new aki_luaChanpionGetter(chanpionUrl, hc);
            service   = new DiscordService(conf.url, hc);
            admin     = new EventAdmin(emgGetter, chGetter);
            bot       = new botController(service, admin);

            bot.rodos = conf.rodos;
            bot.chp   = conf.chp;

            this.chpFile = conf.xmlFile;

            if (chpFile != "")
            {
                admin.setChpTimeList(chpFile);
            }
        }