Exemple #1
0
 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)));
     }
 }
Exemple #2
0
 public StartCommand(PrivateConversationBotDbContext dbContext, IOptions <CustomBotOptions <ConversationBot> > options)
 {
     _dbContext = dbContext;
     _options   = options.Value;
 }