Telegram.Bot icon indicating copy to clipboard operation
Telegram.Bot copied to clipboard

Getting error "Requset time out" using telegram bot with c#?

Open Coderwill opened this issue 9 years ago • 0 comments

I am go send 10 images with caption on the telegram bot using c#.but just go there 2 or 3 image and getting error like this "Request timed out" from the api "SendPhotoAsync".i don't know where is mistake. i am run this in my local pc. and my pc is fully under in network so why i am getting this error any one know please let me.here below listed my code.

`public async Task SendCasesOnTelegramBot() {
DataSet ds = DataAccess.ExecuteDataset(Setting.ConnectionString(), "GetPostForTelegramBot"); if (ds != null && ds.Tables.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { var ImageUrl= MediaPath + ds.Tables[0].Rows[i]["Url"].ToString());
sb.Append(ds.Tables[0].Rows[i]["Description"].ToString());
await Bot.SendPhotoAsync("@abcgrop", photo: ImageUrl,caption:sb.ToString()); // here i am getting error

 }

} }`

This is my code any one please help how can fix it.

Coderwill avatar Sep 22 '17 06:09 Coderwill