public void RunAll() { if (botType == BotType.Main) { VipRoleGiveaway.Run(); WantPlayAutoRemoving.Run(); LevelCounter.Run(); TopUpdating.Run(); } }
public void TurnOffAll() { if (botType == BotType.Main) { VipRoleGiveaway.Stop(); WantPlayAutoRemoving.Stop(); LevelCounter.Stop(); TopUpdating.Stop(); } }
public ServiceControlManager(BotType type) { botType = type; ServiceProvider = BuildDi(); CloudStorage = ServiceProvider.GetRequiredService <ICloudStorage>(); var loggerFactory = ServiceProvider.GetRequiredService <ILoggerFactory>(); VipRoleGiveaway = new VipRoleGiveawayService(ClientControlManager.MainBot, "Розыгрыш VIP роли", loggerFactory); WantPlayAutoRemoving = new InvitationRemover(ClientControlManager.MainBot, "Автоудаление приглашений в игру", loggerFactory); LevelCounter = new LevelCounter(ClientControlManager.MainBot, "Счётчик уровня", loggerFactory); TopUpdating = new TopUpdater(ClientControlManager.MainBot, "Автообновление топа", loggerFactory); }