private static async Task SendBackUpToTelegram(string fileName) { try { var tel = await TelegramBot.GetInstance(); var ts = new Thread(new ThreadStart(async() => await tel.StartSending(TelegramSendType.SendBackUp, fileName: fileName))); ts.Start(); } catch (Exception e) { WebErrorLog.ErrorInstence.StartErrorLog(e); } }
public static async Task <TelegramBot> GetInstance() { return(_me ?? (_me = new TelegramBot())); }