private static void RunBot(Options options, Settings.Settings settings) { using var bot = new TwitchBot(options, settings); bot.OutputMovesTask(); bot.Run(); Console.ReadLine(); }
public TwitchBot(Options options, Settings.Settings settings) { this.options = options; this.settings = settings; this.twitchClient = new TwitchClient(); this.logger = new FileLogger($"log_{DateTime.UtcNow:yyyy-MM-dd}.txt"); this.commands.Add(new CommandInfo("eval", new EvalCommand(this.twitchClient, options, settings))); this.commands.Add(new CommandInfo("static", new StaticCommand(this.twitchClient, options, settings))); this.commands.Add(new CommandInfo("time", new TimeCommand(this.twitchClient, options, settings))); this.commands.Add(new CommandInfo("games", new GamesCommand(this.twitchClient, options, settings))); this.commands.Add(new CommandInfo("rand", new RandCommand(this.twitchClient, options, settings))); this.commands.Add(new CommandInfo("calc", new CalcCommand(this.twitchClient, options, settings))); this.commands.Add(new CommandInfo("db", new DbCommand(this.twitchClient, options, settings))); this.commands.Add(new CommandInfo("idb", new IccfDbCommand(this.twitchClient, options, settings))); this.commands.Add(new CommandInfo("cdb", new ChessDbcnCommand(this.twitchClient, options, settings))); this.commands.Add(new CommandInfo("tb", new TbCommand(this.twitchClient, options, settings))); this.commands.Add(new CommandInfo("links", new LinksCommand(this.twitchClient, options, settings))); this.commands.Add(new CommandInfo("reverse", new ReverseCommand(this.twitchClient, options, settings))); this.commands.Add(new CommandInfo("evalhelp", new EvalHelpCommand(this.twitchClient, options, settings))); this.commands.Add(new CommandInfo("evalengines", new EvalEnginesCommand(this.twitchClient, options, settings))); this.commands.Add(new CommandInfo("temp", new TempCommand(this.twitchClient, options, settings))); this.commands.Add(new CommandInfo("outputmoveson", new SetOutputMovesCommand(this.twitchClient, options, settings, true))); this.commands.Add(new CommandInfo("outputmovesoff", new SetOutputMovesCommand(this.twitchClient, options, settings, false))); this.commands.Add(new CommandInfo("define", new DefineCommand(this.twitchClient, options, settings))); this.commands.Add(new CommandInfo("urban", new UrbanCommand(this.twitchClient, options, settings))); this.commands.Add(new CommandInfo("chesswiki", new WikiCommand(this.twitchClient, options, settings))); //// Console.WriteLine(new WikiCommand(this.twitchClient, options, settings).Execute("!chesswiki AllieStein")); Console.ReadLine(); }