Telegram.Bot.Exceptions.ApiRequestException: Request timed out on SendTextMessageAsync
Hello! I've got a lot of such errors in my bot today... I don't know the reason, may be network or telegram servers issue, but because of timeout my message queue is growing very fast.. I think if I can set less timeout for this error it will be possible to make next try faster... So, the question is - how I can set timeout for SendTextMessageAsync? And what is default value for it now? I can see only UploadTimeout - looks like it's not what I want. Is it possible? I can see only way to use CancellationToken...
You can indeed only use the cancellation token... consider something like this
bot.SendTextMessageAsync(paramsStuff, new CancellationTokenSource(milliseconds).Token);
@Olfi01 i am facing same error using this api "SendPhotoAsync". i am go wanna send image with caption on telegram bot so how can fix ti. can you please tell me.
This is my api code =>
await Bot.SendPhotoAsync("@abc", new FileToSend(ds.Tables[0].Rows[i]["Url"].ToString(), StreamImage), "hiiiii" );