Esempio n. 1
0
        static async Task Main(string[] args)
        {
            var fac = new BotFactory();

            fac.AddProvider("TwitchBot", () => new TwitchProvider(false));
            fac.RegisterPlugin(
                "https://bot.tika.to/plugins/counter",
                () => new CounterPlugin()
                );

            using (var file = File.OpenRead("local.bot"))
            {
                var opts = new LoadOptions();
                var xml  = await XElement.LoadAsync(file, opts, CancellationToken.None);

                fac.LoadConfig(xml);
            }

            var bot = await fac.LoadBot();

            await bot.Run();
        }