public Remove_Rss_Instruction(ITelegramBotClient telegramBotClient, CallbackQueryEventArgs callbackQueryEventArgs, BotPlatform botPlatform) { _telegramBotClient = telegramBotClient; _callbackQueryEventArgs = callbackQueryEventArgs; _commandRssChatService = botPlatform.Resolve <ICommandRssChatRelationService>(); _queryRssChatService = botPlatform.Resolve <IQueryRssChatRelationService>(); }
public BotKickedException(Exception exception, MessagingPlatform messagingPlatform) { if (exception.Message.Equals(BOT_KICKED)) { IQueryRssChatRelationService queryRssChatRelationService = messagingPlatform.Resolve <IQueryRssChatRelationService>(); ICommandRssChatRelationService commandRssChatRelationService = messagingPlatform.Resolve <ICommandRssChatRelationService>(); Response <IList <RssChatRelationEntity> > response = queryRssChatRelationService.GetList(LifeTimeCycle.LifeTimeCycle.ExceptionChat); foreach (var item in response.ResponseData) { commandRssChatRelationService.Remove(item); } return; } //new Exception(exception); }