Ejemplo n.º 1
0
        /// <summary>
        /// Looks after our BotState
        /// </summary>
        public void newBot()
        {
            //Instance our Scripting Environment
            ScriptBot scriptBot;

            using (LogAssume.Assume(_logger))
            {
                scriptBot = new ScriptBot(this, _config["General/botScript"].Value);
                scriptBot.init();
            }

            //Start polling our script
            while (true)
            {
                using (LogAssume.Assume(_logger))
                {
                    scriptBot.poll();
                }

                //Sleep for a bit..
                Thread.Sleep(100);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Looks after our BotState
        /// </summary>
        public void newBot()
        {
            //Instance our Scripting Environment
            ScriptBot scriptBot;
            using (LogAssume.Assume(_logger))
            {
                scriptBot = new ScriptBot(this, _config["General/botScript"].Value);
                scriptBot.init();
            }

            //Start polling our script
            while (true)
            {
                using (LogAssume.Assume(_logger))
                {
                    scriptBot.poll();
                }

                //Sleep for a bit..
                Thread.Sleep(100);
            }
        }