public TestBotManager() { ApiClient = DummyFactory.CreateDummyApiClient(); var botModule = new ChoiceBotMain.ChoiceBot(ApiClient); Manager = new BotManager(ApiClient); Manager.AddBot(botModule); }
public static BotManager CreateDummyChoiceBot() { var apiClient = CreateDummyApiClient(); var botManager = new BotManager(apiClient); botManager.AddBot(new ChoiceBotMain.ChoiceBot(apiClient)); return(botManager); }
private static async Task Start(MastodonClient mastoClient) { var client = mastoClient.ToCommon(); var botManager = new BotManager(client); botManager.AddBot(new ChoiceBotMain.ChoiceBot(client)); Console.WriteLine("choicebot running..."); await botManager.Start(); }
public Bot AddBot(BotConfig config) { var index = Manager.BotConfigs.FindIndex(z => z.Name == config.Name || z.Arguments == config.Arguments); if (index >= 0) { const string line1 = "Device with similar details has already been added."; const string line2 = "Please double check the entered configuration."; WinFormsUtil.Alert(line1, line2); return(Manager[index]); } var bot = Manager.AddBot(config); LB_Bots.Items.Add(new ListBoxExItem(bot, LB_Bots.Items.Count)); return(bot); }