private IDarioBotReply ReplyFor(TelegramFrom @from, TelegramVoice messageVoice)
 {
     if (@from.Id != _forwardId)
     {
         return(new PrivateCommandDarioBotResponse(@from, _telegramApi));
     }
     return(new AudioUploadDarioBotReply(_telegramApi, _repository, @from, messageVoice));
 }
Beispiel #2
0
 public AudioUploadDarioBotReply(
     TelegramBot telegramApi,
     IDarioBotRepository repository,
     TelegramFrom @from,
     TelegramVoice messageVoice)
 {
     _telegramApi  = telegramApi;
     _repository   = repository;
     _from         = @from;
     _messageVoice = messageVoice;
 }
        public DarioBotTests()
        {
            _darioBot = new DarioBot(
                DarioBotConfiguration.Get(DarioBotConfiguration.BotTokenKey),
                DarioBotConfiguration.Get(DarioBotConfiguration.ForwardToIdKey));
            _forwardedId = DarioBotConfiguration.Get(DarioBotConfiguration.ForwardToIdKey);

            _telegramVoiceExample = new TelegramVoice()
            {
                fileId    = "AwADBAADbQYAAtQHAVMH6C2nlJBQnRYE",
                file_size = 27277,
                duration  = 3
            };
        }