private static ITelegramBotClient CreateClient(CustomBotOptions <ReposterBot> options) { if (!options.UseTorProxy) { return(new TelegramBotClient(options.ApiToken)); } else { return(new TelegramBotClient(options.ApiToken, new HttpToSocks5Proxy("127.0.0.1", 9150))); } }
public StartCommand(PrivateConversationBotDbContext dbContext, IOptions <CustomBotOptions <ConversationBot> > options) { _dbContext = dbContext; _options = options.Value; }