예제 #1
0
        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);
            }
        }
예제 #2
0
 public static async Task <TelegramBot> GetInstance()
 {
     return(_me ?? (_me = new TelegramBot()));
 }