send multiple videos at the same time on telegram bot using c#? -


i have create 1 api sending multiple videos @ same time in loop telegram bot using c#.

i getting success uploading videos on telegram bot.

however, facing 1 issue on task. right uploading 1 or 2 videos @ same time in loop , it's works. when try 10 or more videos, 2 or 3 videos uploaded successfully, , utility stops.

it helpful if identify mistake in following code. not getting errors videos don't uploaded , utility stops.

here code:

public async task sendcasesontelegrambot() {                  dataset ds = dataaccess.executedataset(setting.connectionstring(), "getpostfortelegrambot");     if (ds != null && ds.tables.count > 0)     {         (int = 0; < ds.tables[0].rows.count; i++)         {             string videourl = null;             videourl = casemediapath + ds.tables[0].rows[i]["url"].tostring();                     var sb = new stringbuilder();             sb.append("abc");                           await bot.sendvideoasync("@abc", video: videourl, caption: sb.tostring(), replymarkup: replymarkup);               await task.delay(180000); // try not getting success         }     } } 

this api, works few videos.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -