Exemplo n.º 1
0
        public static void Main(string[] args)
        {
            LOIBCConfig botConfig = new LOIBCConfig
                                    (
                new ConfigurationBuilder()
                .SetBasePath(Directory.GetCurrentDirectory())
                .AddJsonFile("appsettings.json")
                .Build()
                                    );

            Log.Logger = new LoggerConfiguration()
                         .WriteTo.LiterateConsole(LogEventLevel.Verbose)
                         .WriteTo.File(botConfig.LogPath, LogEventLevel.Information)
                         .CreateLogger();

            _bot = new LOIBCBot(botConfig);
            _bot.Connect().Wait();

            var webInterface = new LOIBCInterface("http://localhost:8080", _bot);

            Console.WriteLine("LOIBC Connected. Press any key to quit.");
            Console.ReadKey();
        }
Exemplo n.º 2
0
 public ApiController(LOIBCBot bot)
 {
     _bot = bot;
 }