telegrambots / telegram.bot.extensions.polling Goto Github PK
View Code? Open in Web Editor NEWProvides ITelegramBotClient extensions for polling updates
License: MIT License
Provides ITelegramBotClient extensions for polling updates
License: MIT License
There are several instances where parameter/property name does not match ReceiverOptions
type:
With v18 release this repository is now merged into Telegram.Bot and should be archived, and it's NuGet should be marked as obsolete.
CS8411
Asynchronous foreach statement cannot operate on variables of type 'QueuedUpdateReceiver'
because 'QueuedUpdateReceiver' does not contain a suitable public instance or extension definition
for 'GetAsyncEnumerator'
I get this error when I try to use update streams as shown in an example in README.md
My project runs .NET 5, package version is latest atm (0.2.0
)
Hi everyone. I have one problem with Handling Concurrency Conflicts.
I have two project and they work parallel but i have that error:
Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException: Database operation expected to affect 1 row(s) but actually affected 0 row(s). Data may have been modified or deleted since entities were loaded.
How can i solve this problem?
Hi there,
how to handle the load of million of users' messages and process them all without speed lag?
botClient.StartReceiving(
HandleUpdateAsync,
HandleErrorAsync,
receiverOptions,
cancellationToken: cts.Token);
I've used new thread initialization in HandleUpdateAsync and all of my backend services are async, but I have critical speed problems in busy times.
ThrowOutPendingUpdatesAsync
should have 0 timeout
to receive and skip only existing updates. Now it'll wait for a few seconds if there are no pending updates and could skip new updates:
Why is there a JetBrains.Annotations dependency?
Hey,
maybe it will be obvious, but just following your Readme compile tells me that ReceiveOptions does not exist in the current context without any resolution. Can you please advise?
Current implementation doesn't allow the following common pattern:
await foreach (var update in receiver.YieldUpdatesAsync().WithCancellation(cancellationToken))
{
// ...
}
To allow this to work YieldUpdatesAsync
needs to have cancellation token as a parameter with an attribute:
public interface IYieldingUpdateReceiver
{
int PendingUpdates { get; }
IAsyncEnumerable<Update> YieldUpdatesAsync([EnumeratorCancellation] CancellationToken cancellationToken = default);
}
This will allow uniform cancellation support in IYieldingUpdateReceiver
implementations instead of ad-hoc params in different implementations.
I think it's a good idea to add ITelegramBotClient
as the first parameter in IUpdateHandler.HandleUpdate
. This way you don't need to capture a reference to the client with DefaultUpdateHandler
.
It will break the interface, but it's fine since the library is still effectively in preview.
I have a problem when I try connect to database with telegramBot:
System.ObjectDisposedException: Cannot access a disposed context instance. A common cause of this error is disposing a context instance that was resolved from dependency injection and then later trying to use the same context instance elsewhere in your application. This may occur if you are calling 'Dispose' on the context instance, or wrapping it in a using statement. If you are using dependency injection, you should let the dependency injection container take care of disposing context instances.
Object name: 'ApplicationContext'.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.