private Func <Task> SendChordsAsFileFn(Chords chords, long chatId) { var formattedChords = _chordsFormatter.Format(chords); var fileName = $"{chords.SourceLink.SongAuthor} - {chords.SourceLink.SongName}"; var txtFile = ToTextFile(fileName, formattedChords); return(SendFileFn(txtFile, chatId)); }
public async Task <string> Test(string query) { var link = await _chordsService.FindFirst(query); var chords = await link.Bind(x => _chordsService.Get(x)); var result = chords.Bind(x => _chordsFormatter.Format(x).Return()); return(result.ToString()); }